Login  Register

Re: VBO Performance Misunderstanding

Posted by gouessej on Apr 21, 2015; 8:25am
URL: https://forum.jogamp.org/VBO-Performance-Misunderstanding-tp4034319p4034349.html

Use a plain animator (replace FPSAnimator by Animator) and disable v-sync.

You can't write beyond the capacity of your buffer. You should stop updating your buffer in your loop when floatBuffer.limit() + 3 >= floatBuffer.capacity().

I have rarely used glMapBufferRange. The documentation says:
offset and length indicate the range of data in the buffer object that is to be mapped, in terms of basic machine units
https://www.opengl.org/sdk/docs/man/html/glMapBufferRange.xhtml
Maybe your offset is wrong.

Please call floatBuffer.rewind() before unmapping the buffer by safety even though it might be useless.
Julien Gouesse | Personal blog | Website