I’m using the GLUT to tesselate the contour of a human body and draw it as a solid shape. Everything is fine if I draw directly from the tesselation algorithm, like the picture below.
I need to store the vertices into an array and draw the whole array with a SINGLE draw mode. The problem is, the tesselation algorithm breaks up the shape into various sections and uses different drawing modes for each, like triangles, triangle_fan etc.
How can I get this output to work if I’m limited to only one single drawing mode, say just triangles? Is there a way to force the algorithm to be consistent?
If you have direct access to the tesselated vertex/index data, converting triangle fans and triangle strips to plain triangles should be straightforward, no?
Thanks for the tip Nico. Somehow I assumed that would be a tricky thing to do. Now that I think about it I guess you’re right. I’ll try to manually generate an index array for the vertices that I get from the tesselation, so they can be drawn as triangles only.
This can be done by registering an empty callback for GLU_TESS_EDGE_FLAG.
BRILLIANT!! That’s what I was hoping for=) Thanks a lot!