core profile context must call glBindVertexArray?

ATI card 4770.use opengl 3.3 core profile context must call
glGenVertexArrays(1, &vao);
glBindVertexArray(vao);
OtherWise glVertexAttribPointer or glEnableVertexAttribArray error.

compatibility profile context no need.
Is opengl Spec?or amd’s driver problem?

The 3.2 (and above) core specification requires that you must bind a VAO before calling any of the vertex attribute functions. ATI’s driver is doing the right thing by giving you an error.

Even if it is not approved by the performance! :slight_smile:

Even if it is not approved by the performance!

Because creating a VAO and binding it at your program’s start will utterly annihilate your performance.

Right…

Alfonse, could you provide as with some information about VAO execution time on ATI, please?

I do not have an ATI card, so I cannot do it om my own. It will be very interesting to reveal at last:

  1. What is the time needed to bind a VAO (it extensively depends on the number of VAOs, because of address resolution, cache polution, etc.; the same sort of problems with the number of VBOs, solved by Bindless extension) compared to binding VBO + enabling attributes?

  2. What is the time needed to change VAO (bind, add new state, enable/disable attribute, unbind) compared to binding VBO and enabling certain (additional) attribute? Of course, this has to be done under compatibility profile on ATI.

Measuring the execution time can be tricky because of various drivers’ optimizations, but it would give us some values about which we could discuss.

This thread is not talking about the comparative efficiency of changing VAOs, or the performance of using VAOs to encapsulate the state for rendering a mesh, or anything like that. That was the point I was trying to make. The thread is about using one VAO in the core profile, creating and binding it at the beginning of the program and then pretending like VAOs don’t exist.

This does not cause a performance penalty.

I’m sorry, Alfone. I didn’t understand it correctly. I totally agree that there shouldn’t be any performance penalty if there is one, always bound, VAO.