PDA

View Full Version : tesselation using glu



groovemaster
09-06-2005, 06:40 AM
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[5][3] 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,
greets

kon
09-06-2005, 07:02 AM
The FAQ is still a good place to look at:
OpenGL FAQ (http://www.opengl.org/resources/faq/technical/glu.htm#0040)

groovemaster
09-06-2005, 07:58 AM
indeed it is, didnt think to look there.
thanks mate!