Hi,
I’m using a vertex array with a FloatBuffer created by BufferUtils. Here is the code:
this.vbuf = BufferUtil.newFloatBuffer(this.width * this.height * 3);
this.vbuf.put(new float[] { x, y, z });
...
gl.glEnableClientState(GL.GL_VERTEX_ARRAY);
gl.glVertexPointer(3, GL.GL_FLOAT, 4, this.vbuf);
...
gl.glArrayElement(someindex);
I have to set the stride to 4 in the glVertexPointer call but in all examples I see the stride is set to 0. Can anyone explain this to me? the vbuf is just a simple FloatBuffer holding vertices with 3 elements.