I already posted this on AMD developer forums but just in case anyone else is having this issue:
glVertexAttribPointer() always fails for me on AMD (not on NVidia) 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 checks if VAO is bound, instead of checking that VBO is bound.
Note that GL_ARRAY_BUFFER is VBO buffer, not VAO buffer.
I read it, but I still think that the specification text I quoted clearly (well, after reading it very carefully several times) is about VBO and not about VAO.
Yes it is. But it’s not the only text in the spec on this subject.
Does the specification somewhere explicitly say that default vertex array object (0) is deprecated?
No. The core GL specification clearly says that there is no VAO number 0:
Deprecated means “marked for removal”; deprecated functionality still exists, but may not in later versions. Removed means removed. Things were deprecated in GL 3.0. They were removed in 3.1.
Apologies for editing my post while people were already quoting it.
Still I think the deprecation and removing and specifically the invalid operation - if really intended - should be mentioned in 2.8 and not only in E.2. Also, ‘vertex array object’ could be interpreted to mean VBO vertex array buffer object as in 2.8.
Still I think the deprecation and removing and specifically the invalid operation - if really intended - should be mentioned in 2.8 and not only in E.2.
I agree, but the GL drivers forum probably isn’t the best place to mention this
Also, ‘vertex array object’ could be interpreted to mean VBO vertex array buffer object as in 2.8.
There’s no such thing as a “vertex array buffer object”. There is a such thing as a “vertex array object.” So clearly that’s what they’re talking about.
Okay, after reading the specifications again I have to admit that the specification seems to be fine, as well as AMD implementation.
Apparently the body of the specification does not really cover the forward compatible context. If you want to use the forward compatible context you have to carefully read both the body text and the appendix E. I kind of wish that the main text had at least footnotes in the places that are affected by forward compatibility.