Tessellating the union of 2d contours: extra info


When using OpenGL to tessellate the union of 2d contours, the result is a bunch of triangles. Is there a way to know which of the original contours each triangle belongs to?



Actually, I don’t remember any native OpenGL functions to tesselate the union of 2 polygons. Just now I’ve looked through specs (maybe, I forgot it?), but no, it isn’t mentioned anywhere.

So, it may be better just to do this union by yourself, so you will know everything about triangles, edges and so on.

Hmmm, maybe I posted in the wrong section. Since GLU is a standard part of OpenGL implimentation, I didn’t think I needed to post in the utilities forum, but I guess I’ll repost there.

Just to clarify, I’m using a GLUtessellator to tessellate the union of some contours using GLU_TESS_WINDING_POSITIVE winding rule as described in the Red Book. I get the results I want, I was just wondering if there was a way to recover information about which contour (or contours) a resulting triangle is in.

Thanks again,