cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

neure
Journeyman III

glVertexAttribPointer() check (in)correct for forward compatible context

Solved - it is correct after all

glVertexAttribPointer() always fails for me if I do not use vertex array object in forward compatible context.

The specification text says:

"An INVALID_OPERATION error is generated under any of the following conditions:

...

* any of the *Pointer commands specifying the location and organization of vertex array data are called while zero is bound to the ARRAY_BUFFER buffer object binding point (see section 2.9.6), and the pointer argument is not NULL."

I have a proper VBO bound to ARRAY_BUFFER with glBindBuffer().

If I remove the forward compatible flag from the context, my application works fine. To me, this looks like a driver bug: The checks added into forward compatible config incorrectly check if VAO is bound, instead of checking that VBO is bound.

Note that GL_ARRAY_BUFFER is VBO buffer, not VAO buffer.

Edit: It was brought to my attention that E.2. in the specification also hints that VAO could be deprecated/removed. Personally I think E.2 and 2.8 contradict each other, because they talk about different things. So maybe ARB should clarify..

Second edit: The AMD implementation is okay, and so is the specification. The main text doesn't really cover forward compatible contexts, for those you have to apply appendix E. So indeed vertex array objects are strictly speaking required by forward compatible contexts.

0 Likes
1 Reply
pboudier
Staff

agreed.

there is no default VAO in core context, and the application needs to create/bind one !

Pierre B.

0 Likes