PDA

View Full Version : Application lags @ about 1000 Triangles



Yerst_
09-05-2012, 03:13 PM
Hi!
Im working with OpenGL ES 1.0 on Android.
I wrote a .OBJ model importer, but it starts to lag with bigger models.
So i tried just to call the gl.glDrawArrays() Method 1000 times in the onDrawFrame().
And it lagged again.
Does the gl.glDrawArrays really need that much performance?

The only opinion i am able to imagine to solve that problem is renderering a whole Mesh in just one glDrawArrays Method, but thats will be much more complicated, so i decided to ask before i edit anything.
Sorry for my bad language, Yerst.

malexander
09-05-2012, 05:11 PM
Sending geometry to the hardware in so many small batches will seriously affect your application's performance. The hardware can't use its parallel hardware to process the vertices, and the CPU overhead is going to be high. You don't have to bundle up the entire mesh in only one glDrawArrays() or glDrawElements() call, but you should be grouping many triangles together in a draw call.