LWJGL Forum

Programming => OpenGL => Topic started by: plummew on June 19, 2007, 23:43:12

Title: LWJGL Exception thrown having processed a VBO...
Post by: plummew on June 19, 2007, 23:43:12
Hi,

Can anyone shed light on the following exception:

Exception in thread "main" org.lwjgl.opengl.OpenGLException: Cannot use Buffers when Array Buffer Object is enabled
        at org.lwjgl.opengl.GLChecks.ensureArrayVBOdisabled(GLChecks.java:84)
        at org.lwjgl.opengl.GL11.glVertexPointer(GL11.java:2528)

I've previously rendered a VBO using glDrawRangeElements and the exception above is thrown when I attempt to set the vertex pointer for a vertex array (not a VBO)

Any ideas? (I assumed I could mix and match vert arrays and VBOs...)
Title: Re: LWJGL Exception thrown having processed a VBO...
Post by: Matthias on June 20, 2007, 07:29:15
You need to call ARBVertexBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER, 0); before you can use vertex arrays again.

Ciao Matthias
Title: Re: LWJGL Exception thrown having processed a VBO...
Post by: plummew on June 21, 2007, 00:12:29
Cheers,

That did the trick.

As I was buffering indices, I needed to unbind GL_ELEMENT_ARRAY_BUFFER_ARB too.