PDA

View Full Version : Question about lighting using gluTess



beginner
02-05-2001, 05:53 AM
I'm using gluTess* to create polygons with hole. But, the looking of them is not so good as the glVertex/glNormal. The lighting is not working. Do I need more other lines codes to get better lighting effects ?

Example code:


gluTessBeginPolygon(obj, NULL);
gluTessNormal(obj,...);
gluTessBeginContour(obj);
gluTessVerte(obj,v1);
gluTessVertex(obj,v2);
gluTessVertex(obj,v3);
gluTessVertex(obj,v4);
gluTessEndContour(obj);

gluTessBeginContour(obj); // hole
gluTessVertex(obj,v5);
gluTessVertex(obj,v6);
gluTessVertex(obj,v7);
gluTessVertex(obj,v8);
gluTessEndContour(obj);

gluTessEndPolygon(obj);