I'm trying to draw cube using tessellation and primitive restart index. With using primitive restart index I can reduce index count down to 17, and draw cube with something like this:
glEnable(GL_PRIMITIVE_RESTART);
glPrimitiveRestartIndex(0xFFFF);
glDrawElements(GL_TRIANGLE_STRIP, 17, GL_UNSIGNED_SHORT, NULL);
So, in this case I'm getting strange results, but drawing cube with 36 indices and GL_TRIANGLES
type works just fine.
How can I use tessellation with glPrimitiveRestartIndex()
?