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.