Login  Register

Re: How to use VBO?

Posted by gouessej on Jan 18, 2015; 9:57pm
URL: https://forum.jogamp.org/How-to-use-VBO-tp4033871p4033885.html

Sorry but your change is wrong, you broke something that was correct, rather write that:
gl.glEnableClientState(GLPointerFunc.GL_VERTEX_ARRAY);
...
gl.glDisableClientState(GLPointerFunc.GL_VERTEX_ARRAY);

Look at the documentation:
https://www.opengl.org/sdk/docs/man2/xhtml/glEnableClientState.xml

No you don't have to call glDrawBuffer, you should call glDrawArrays, it was correct:
gl.glDrawArrays(GL2GL3.GL_QUADS,0,fBuff.capacity()/3);

You should really spend some time in reading the example I quoted because you seem to make some changes without understanding how the API works.
Julien Gouesse | Personal blog | Website