I am developing a benchmark to find if it's better to use display lists or vbos for future private purposes.
The benchmark is quite simple, it consists in a window where a static model of about
4000 triangles is drawed multiple times.
First i stored my model data in a display list and then in my render i called that dl 1000
times per frame. I got a result of about 37 fps.
Then i tried to use Vbos to draw my model but i am quite new with vbos so i think i've just got
something wrong becouse drawing 1000 models on screen i go a result of 2 to 5 fps.
I just followed some tutorials to implements vbos and i used the following code in my vbo model draw method:
gl.glEnableClientState(GL.GL_VERTEX_ARRAY); gl.glEnableClientState(GL.GL_TEXTURE_COORD_ARRAY); gl.glBindBufferARB(GL.GL_ARRAY_BUFFER_ARB, VBOTexCoords);
gl.glTexCoordPointer(2, GL.GL_FLOAT, 0, 0); gl.glBindBufferARB(GL.GL_ARRAY_BUFFER_ARB, VBOVertices);
gl.glVertexPointer(3, GL.GL_FLOAT, 0, 0);
gl.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, getTrianglesNumber()*3);
Did i do something wrong or is it common that with many triangles my performances drop significantly using vbos?