The article actually talks about a minimum of 24 (according to the specification). But your problem is still there, there is a limit and you cannot go crazy with hundreds of sprites. I think you should find a way to split that task under the hood. Let your SpriteBatcher draw multiple batches of 24-something sprites at a time.
On Friday, February 15, 2013 6:50:27 AM UTC-6, reaktor24 wrote: > > Hi. I am reading the book by Mario Zechner and am on Chapter 8 which > discusses Sprite Batching. It is relatively straight forward when dealing > with OpenGL 1.1 but I am trying to write the code using shaders and OpenGL > 2. I am quite confused though as the matrix needs to be updated for the > positions and sent to the shader but his code doesn't deal with shaders and > I am not getting anything appearing on the screen. Something isn't right. I > read on this page that you should send an array of matrices to the shader > at each update: > > http://antonholmquist.com/blog/sprite-batching-opengl-es-2-0/ > > But this means you can only send a maximum of 24 sprite positions with > each update. That isn't good enough. Mario's code is sending 100 sprites > every frame, not 24. Surely it should be easier under OpenGL 2 and not more > complicated. Anyone got any advice? > > Steve > -- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

