Login  Register

Re: array vertex_buffer_object must be disabled to call this method

Posted by Sven Gothel on Dec 01, 2011; 11:53am
URL: https://forum.jogamp.org/array-vertex-buffer-object-must-be-disabled-to-call-this-method-tp3551291p3551330.html

On Thursday, December 01, 2011 12:36:25 PM gmseed [via jogamp] wrote:

>
> Hi
>
> I implemented the Java port of Vertex Buffers at Java-Tips::
>
> http://www.java-tips.org/other-api-tips/jogl/vertex-buffer-objects-nehe-tutorial-jogl-port-2.html
>
> If the flag mUseVBO is true and VBOs are used it works fine.
>
> However, if I set to mUseVBO to false then it defaults to using vertex
> arrays. In this case I get the following exception thrown:
>
> Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: array
> vertex_buffer_object must be disabled to call this method
> at jogamp.opengl.gl4.GL4bcImpl.checkBufferObject(GL4bcImpl.java:32027)
> at jogamp.opengl.gl4.GL4bcImpl.checkArrayVBODisabled(GL4bcImpl.java:32037)
> at jogamp.opengl.gl4.GL4bcImpl.glVertexPointer(GL4bcImpl.java:30986)
> at
> com.itp.geo.threed.jogl.VertexBufferObjectRenderer.render_fill(VertexBufferObjectRenderer.java:134)
>
> and originates at the call:
>
> gl2.glVertexPointer(3, GL.GL_FLOAT, 0, mVertices);
>
> Presumably the example at Java-Tips fails and I don't understand what the
> exception is saying as the backup vertex arrays is not binding the vertex
> buffer.

It simply says that you are using the non VBO variant of glVertexPointer,
but you have enabled VBO. Hence even though mUseVBO is false, you are enabling VBO
(bind/enable [VBO] buffer).

~Sven