I'm writing a basic spriting engine for a blackberry app, and I want to know the best way to draw tons of sprites using the
We have several sprites that move around the screen, and a bunch of sprites for background tiles. Zelda-1 like tiling.
My first idea was to create a quad at the origin for every sprite that exists and
glTranslatef it to wherever it needs to be. But several hundred sprites to draw per frame, you only get to call this once for every call to
glDrawArrays() so its not a good idea to call
glTranslatef() on each sprite as you draw it. That's the reason
glVertex3f() was left out..
So I'm left with the option of maintaining a master vertex array and every time a sprite moves in the game, pushing the update to move the 4 vertices that represent its quad in the MASTERVERTEXARRAY. I don't like this but it seems my only option.
What I'd really like is to be able to somehow create an array of "translation values" to use for every quad that gets drawn..
glTranslateArray( ... ) ;
But alas, no such thing exists.