I am facing a strange crash that randomly appears when trying to bind a VAO.
the VAO itself has previously been generated by glGenVertexArrays, which returns no error.
glGenVertexArrays(NUM_VAO,vao);
glGenBuffers(NUM_VAO,vbo);
glBindVertexArray(vao[2]);
glBindBuffer(GL_ARRAY_BUFFER,vbo[2]);
glBufferData(GL_ARRAY_BUFFER,1024*sizeof(GLfloat),NULL,GL_DYNAMIC_DRAW);
glVertexAttribPointer(...);
glEnableVertexAttribArray(...);
during execution, a call to:
glBindVertexArray(vao[2])
may or may not generate an INVALID_OPERATION. Note that the content of vao[2] is the same returned by glGenVertexArrays and the array is never deleted during execution.
According to the specs, an INVALID_OPERATION is issued only when a non-zero name is passed and the name itself was not returned by glGenVertexArrays, which is clearly not the case.
The problem occurs sporadically, approximately only 15% of the times the application is run, otherwise everything works as expected. The problem persists in debug mode.
I just upgraded my workstation, I used to develop on OpenSUSE 12.1 with NVidia drivers 290.10 and Qt 4.7.1 and never had this problem.
I just moved to OpenSUSE 12.2 with NVidia drivers 304.43 and Qt 4.8.1 and I have this issue.
Have someone encountered such a situation before? Am I missing something?