Login  Register

Re: glVertexAttribPointer causes GL_INVALID_OPERATION

Posted by Hotzenplotz on Nov 18, 2011; 6:03pm
URL: https://forum.jogamp.org/glVertexAttribPointer-causes-GL-INVALID-OPERATION-tp3518547p3519280.html

Ok, solved it by myself by inspecting the VertexProgWarp.java of the demos. In the first calls to the display method it seems like opengl is not fully initialized, therefore it throws an invalid operation. I included a framecounter that gets incremented on each display-invocation and only call methods like glVertexAttribPointer when the counter is greater than 1.

Edit: No, the display method only got to frame #1, so the code was never called and threw no exception. The problem is still there.