I keep getting this error trying to get a basic VBO to work. Is this a common error?
Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: array vertex_buffer_object must be disabled to call this method
gl.glGenBuffersARB(1, vertexVBO, 0)
gl.glGenBuffersARB(1, indexVBO, 0)
// bind VBOs for vertex array and index array
gl.glBindBufferARB(GL.GL_ARRAY_BUFFER_ARB, vertexVBO(0)) // for vertex coordinates
gl.glBufferDataARB(GL.GL_ARRAY_BUFFER_ARB, triangleCount * 3 * 3 *
BufferUtil.SIZEOF_FLOAT, vertices, GL.GL_STATIC_DRAW_ARB)
gl.glBindBufferARB(GL.GL_ELEMENT_ARRAY_BUFFER_ARB, indexVBO(0)) // for indices
gl.glBufferDataARB(GL.GL_ELEMENT_ARRAY_BUFFER_ARB, triangleCount * 3 *
BufferUtil.SIZEOF_SHORT, indices, GL.GL_STATIC_DRAW_ARB)
// number of coordinates per vertex, the type of each coordinate, stride, and ptr offset
gl.glVertexPointer(3, GL.GL_FLOAT, 0, vertices)
... fill in with data ...
gl.glEnableClientState(GL.GL_VERTEX_ARRAY) // activate vertex coords array
gl.glDrawElements(GL.GL_TRIANGLES, triangleCount, GL.GL_UNSIGNED_SHORT, 0)
gl.glDisableClientState(GL.GL_VERTEX_ARRAY)
// bind with 0, so, switch back to normal pointer operation
gl.glBindBufferARB(GL.GL_ARRAY_BUFFER_ARB, 0)
gl.glBindBufferARB(GL.GL_ELEMENT_ARRAY_BUFFER_ARB, 0)