need help understanding glVertexAttribPointer and GL_INVALID_OPERATION
Posted by
jmaasing on
Jan 07, 2013; 8:06pm
URL: https://forum.jogamp.org/need-help-understanding-glVertexAttribPointer-and-GL-INVALID-OPERATION-tp4027730.html
I started out with the RawGL2ES2demo.java and that worked fine. Then I decided to play around with GL3 so I changed the shaders a little bit (made them even more stupid) but I can't seem to get the hang of how to use glVertexAttribPointer
I pass in a direct float buffer but I get:
glGetError() returned the following error codes after a call to glVertexAttribPointer(<int> 0x0, <int> 0x3, <int> 0x1406, <boolean> false, <int> 0x0, <java.nio.Buffer> java.nio.DirectFloatBufferU[pos=0 lim=9 cap=9]):
GL_INVALID_OPERATION ( 1282 0x502),
I must be missing something fundamental but I've been looking at the specs the entire day and trying stuff at random with no luck. If anyone could point me in the right direction I'd be very happy :)
I'm using jogamp 2.0-rc11 on OSC 10.8. I've upladed a test case:
GL3TestAttrib.java