View Full Version : VBO & element arrays for tri strips

04-01-2004, 08:10 AM
I have indices for multiple triangle strips packed into a single element array buffer. I have the number of indices for each strip stored in a separate array. When I loop over them like so, I get a crash on the second (of 6) triangle strips in my test object.

#define BUFFER_OFFSET(i) ((char *)NULL + (i))
for ( unsigned int i = 0; i < g->getNumStrips(); ++i )
glDrawElements(g->getPrimitiveType(i), g->getNumIndices(i), g->getIndexType(), BUFFER_OFFSET(4*g->getIboOffset(i)));
}Any ideas? Am I doing multiple strips from the same index buffer correctly? I'm most worried about the last argument to glDrawElements()....everything works as expected if I only have one strip per element array buffer.

Edit: Forgot to mention I'm on an FX 5600 with driver version 52.16.

04-05-2004, 08:02 AM
So no one knows whether it is possible to put multiple triangle strips in the same index buffer?

04-05-2004, 08:58 AM
Try glMultiDrawElements.