Login  Register

Re: GL2ES2 : glEnableClientState(GL2ES2.GL_VERTEX_ARRAY) issue

Posted by vslash on Mar 22, 2013; 4:32pm
URL: https://forum.jogamp.org/GL2ES2-glEnableClientState-GL2ES2-GL-VERTEX-ARRAY-issue-tp4028490p4028758.html

Ok, got it : as expected, i was wrong ; for those reading this post, i wrote the entire program in C++, and find 2 interesting things :
1) indices element : represent the vertex number, not the vertex position inside the buffer eg :
  vertices[] = {x0,y0,z0,x1,x2,z2}
  indices[] = {0,3} ==> BAD
  indices[] = {0,1} ==> GOOD

2) indices type seem to be expected as uBYTE, nothing else (like uSHORT), despite the fact we specify it at the 3rd args of dlDrawElements. I'll investigate more on this.

3) I'll post here the 3 methods using VBO binding (drawArrays with VBO, drawElements with VBO + indices as an array, drawElements with VBO + indices as a VBO).

4) Conclusion : then, in our case, Jogl API works like in C, there's no issue.
++
v/