OpenGL VBOs are slower then glDrawArrays.

Posted by Arelius on Game Development See other posts from Game Development or by Arelius
Published on 2011-03-11T21:58:03Z Indexed on 2011/03/12 0:18 UTC
Read the original article Hit count: 236

Filed under:
|
|

So, this seems odd to me. I upload a large buffer of vertices, then every frame I call glBindbuffer and then the appropriate gl*Pointer functions with offsets into the buffer, then I use glDrawArrays to draw all of my triangles.

I'm only drawing about 100K triangles, however I'm getting about 15FPS.

This is where it gets weird, if I change it to not call glBindBuffer, then change the gl*Pointer calls to be actual pointers into the array I have in system memory, and then call glDrawArrays the same, my framerate jumps up to about 50FPS.

Any idea what I weird thing I could be doing that would cause this? Did I maybe forget to call glEnable(GL_ALLOW_VBOS_TO_RUN_FAST) or something?

© Game Development or respective owner

Related posts about opengl

Related posts about Performance