Where is the glIndexPointer? Is there any other way, to use VBO for indices?
Thomas
Read "2.8A.1 Vertex Arrays in Buffer Objects" in the vertex_buffer_object doc (http://oss.sgi.com/projects/ogl-sample/registry/ARB/vertex_buffer_object.txt).
I think you use the BufferData function to upload the vertices. The you can use the glDrawElements function that takes a "int indices_buffer_offset" to specify the offset.
I demand a working glIndexPointer Function as well as a correct implementation of glVertexPointerPointer, glColorPointer and glNormalPointer, that hal all parameters of the C function and accepting a ByteBuffer as last parameter. With the current implementation it is impossible to make working interleaved arrays Bytes Floats and Doubles mixed
Quote from: Krux on February 18, 2012, 16:51:51
...With the current implementation it is impossible to make working interleaved arrays Bytes Floats and Doubles mixed
I think you're ignoring the fact that people are able to make working VBOs in LWJGL.
don't take that demand too serious, but i would still be happe to easily port something like that
struct Vertex{
float x,y,z; //coord
char nx,ny,nz; //normal
float tx, ty; //texture coord
};
Vertex[] vertices = [...];
glVertexPointer(3,GL_FLOAT,sizeof(Vertex),&vertices[0].x);
glNormalPointer(GL_BYTE,sizeof(Vertex),&vertices[0].nx);
glTexCoordPointer(2,GL_FLOAT,sizeof(Vertex),&vertices[0].tx);