I have drawn a concave polygon, using the code below
gluTessBeginPolygon(tobj, NULL);
gluTessNormal(tobj,0,0,1);
gluTessBeginContour(tobj);
gluTessVertex(tobj, rect[0], rect[0]);
gluTessVertex(tobj, rect[1], rect[1]);
gluTessVertex(tobj, rect[2], rect[2]);
gluTessVertex(tobj, rect[3], rect[3]);
gluTessVertex(tobj, rect[4], rect[4]);
gluTessEndContour(tobj);
gluTessEndPolygon(tobj);
As can be seen from the code, I have also defined the normal.
My first question is “When I have not included the gluTessNormal function, the lighting is still correctly performed. Then what is the benefit (or aim) of defining normal?”
Second one:"When I have defined the normal as given in the sample code, does this normal only affect the first vertex or does it become the surface normal of polygon (in other words affect all the vertices forming the polygon)?
Thanks in advance.