I’m getting pretty confused about what state is really element buffer binding.
According to my experience it is VAO state thus switching VAOs also switches element array buffer binding.
However, I’m now confused because AFAIK the GL spec language does not state this anywhere.
It says the following about what VAOs encapsulate:
The currently bound vertex array object is used for all commands which modify
vertex array state, such as VertexAttribPointer and EnableVertexAttribArray;
all commands which draw from vertex arrays, such as DrawArrays and DrawEle-
ments; and all queries of vertex array state (see chapter 6).
Also, I did not found in the GL core spec 4.1 any binding like ELEMENT_ARRAY_BUFFER_BINDING for them as it was ELEMENT_ARRAY_BUFFER_BINDING_ARB in the GL_ARB_vertex_buffer_object.
Can anybody clarify this to me?
Why there is no explicit wording about it in the spec?
Thanks Alfonse. I was pretty sure this is the case but I was frustrated that I didn’t find the ELEMENT_ARRAY_BUFFER_BINDING in the spec. Maybe PDF search bug
As a general rule when searching the spec PDFs: if you’re looking for a Get field, search won’t find it. For some reason, it can’t search the stuff in the state tables. Which means if the Get field isn’t mentioned in the text, the search can’t find it.
So if you’re looking for a Get, it’s best to just go straight to the source.