Hi
I’m trying to render only a part of an VBO-element-buffer, so I don’t need to switch buffers all the time. It doesn’t seem to work though. I don’t see any sane reason why this shouldn’t work, but if you know one, please enlighten me
This is the code I’m using. It’s supposed to render two triangles from somewhere (here the second triangle) in the element-buffer. It doesn’t render anything though.
#define BUFFER_OFFSET(i) ((char *)NULL + (i))
glBindBufferARB( GL_ARRAY_BUFFER_ARB, pos_buf );
glVertexPointer( no_verts, GL_FLOAT, 0, 0 );
glEnableClientState(GL_VERTEX_ARRAY);
glBindBufferARB( GL_ELEMENT_ARRAY_BUFFER_ARB, elem_buf );
glDrawElements( GL_TRIANGLES, 6, GL_UNSIGNED_INT, BUFFER_OFFSET(3) );
Regards,