I want to use glu tesselation for tesselating my concave poly’s. I dont get the callback mechanism tough. Could someone show me how i get to the triangles after i have tesselated? Just a simple example?
I used a GLdouble poly to put my concave polygon in, then i tesselate:
GLUtesselator* tess = gluNewTess(); gluTessBeginPolygon(tess, NULL); gluTessBeginContour(tess); for(int i=0; i<5; i++) gluTessVertex(tess, poly[i], NULL); gluTessEndContour(tess); gluTessEndPolygon(tess); // get triangles? gluDeleteTess(tess);
which callbacks would be necessary and what do i do in them if i want to get to the triangles? i dont get how i could get the tesselation info if i have to code what happens in the callbacks myself.
thanks for the advice,