Mars_9999
11-26-2007, 08:00 PM
I think and hope I am close to having this worked out, but I am not able to render the whole terrain correctly? I think I have it narrowed down to this
glVertexPointer(3, GL_FLOAT, vertexStride, BUFFER_OFFSET(0));
glDrawElements(GL_TRIANGLES, numberIndices, GL_UNSIGNED_SHORT, BUFFER_OFFSET(0));
the glVertexPointer() I need to somehow offset the BUFFER_OFFSET()
I have tried this
index = 0;
//loop here
glVertexPointer(3, GL_FLOAT, vertexStride, BUFFER_OFFSET(index)); glDrawElements(GL_TRIANGLES, numberIndices, GL_UNSIGNED_SHORT, BUFFER_OFFSET(0));
index +=vertexStride;
but that doesn't work either??? I only get partially rendered terrain???
Thanks
glVertexPointer(3, GL_FLOAT, vertexStride, BUFFER_OFFSET(0));
glDrawElements(GL_TRIANGLES, numberIndices, GL_UNSIGNED_SHORT, BUFFER_OFFSET(0));
the glVertexPointer() I need to somehow offset the BUFFER_OFFSET()
I have tried this
index = 0;
//loop here
glVertexPointer(3, GL_FLOAT, vertexStride, BUFFER_OFFSET(index)); glDrawElements(GL_TRIANGLES, numberIndices, GL_UNSIGNED_SHORT, BUFFER_OFFSET(0));
index +=vertexStride;
but that doesn't work either??? I only get partially rendered terrain???
Thanks