Quantcast
Channel: User spraff - Stack Overflow
Viewing all articles
Browse latest Browse all 56

GL_NO_ERROR when glVertexAttribPointer has no bound buffer

$
0
0

I have called glVertexAttribPointer without binding GL_ARRAY_BUFFERfirst:

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?


Viewing all articles
Browse latest Browse all 56

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>