views:

217

answers:

2

I'm making a game for android where I need to draw a lot of points that change position every frame. I use the ndk to get faster processing performance of the math/physics section of the game, so I need to use OpenGL to get the fastest performance.

Right now, I make a texture every frame out of an array that holds the colors of every pixel. I am only able to get ~10 frames per second with this method. Is there anyway I could speed this up?

+1  A: 

Vertex Buffer Objects (VBO's) might be what you're after. There's a nice tutorial here.

Marcelo Cantos
+1  A: 

For now Android only guarantees OpenGL ES 1.0 and VBO's weren't in until 1.1. You can create two GLSurfaceView.Renderers, one that uses glDrawArrays that will work with 1.0 and one that uses VBOs for 1.1 and swap them out based on a check for 1.1 compatibility.

CaseyB