Hi guys,
I am trying to create and use array elements buffer with no success.
I have no problem to find examples of how to work with VBOs but don’t know how to incorporate buffers of indices.
My code is like this:
// Create indices buffer
glGenBuffers(1, &Id);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB, Id);
glBufferData(GL_ELEMENT_ARRAY_BUFFER_ARB, …
Using the buffers:
glEnableClientState(GL_VERTEX_ARRAY);
// Enable client state for indices buffer?
//
glBindBuffer(GL_ARRAY_BUFFER_ARB, …
glVertexPointer(3, GL_FLOAT, 0, 0);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB, …
// Is it needed?
What is the equivalent of ‘glVertexPointer’ to indices array?
I am little bit confused…
Please your help,
Yossi