I have modified my code to use two different VBO’s…one for the static walls, and one for the user path that changes almost every frame. This is to speed up processing on the backend, so I don’t have to redo the walls every time I change paths.
I basically duplicated all of my VBO code. Problem is when I get down to my glDrawElements (which is in my render call), I can’t figure out how to tell it WHICH buffer to draw from.
Do I need to do something with my ClientState or something to switch which buffer I’m drawing from?
Edit: Update: I was getting a crash because one of the buffers was being passed an empty index array. I added at least two to keep it from crashing (there’s no pathing info at the start) and it now works…but its still only drawing from the second VBO.
I’m calling glDrawElements and passing it the first array of indices, and it doesn’t do anything, but it is drawing the stuff from the second VBO’s indices when I call glDrawElements a second time and pass it the second set of indices.