I have called glVertexAttribPointer
without binding GL_ARRAY_BUFFER
first:
If pointer is not NULL, a non-zero named buffer object must be bound to the GL_ARRAY_BUFFER target (see glBindBuffer), otherwise an error is generated.
I had trouble finding this bug because the error is GL_NO_ERROR
after calling glVertexAttribPointer
, but glGet(GL_ARRAY_BUFFER_BINDING)
yields 0, so shouldn't this raise this error?
GL_INVALID_OPERATION is generated if zero is bound to the GL_ARRAY_BUFFER buffer object binding point and the pointer argument is not NULL.
This failure to yield an error happens when pointer
is non-null.
Is this a bug in my OpenGL driver? Or am I looking for the error in the wrong way?