The gluBeginPolygon and gluEndPolygon functions delimit a polygon description.
void gluBeginPolygon(
GLUtesselator * tess
);
void gluEndPolygon(
GLUtesselator * tess
);
Use gluBeginPolygon and gluEndPolygon to delimit the definition of a nonconvex polygon.
Once gluEndPolygon is called, the polygon is tessellated, and the resulting triangles are described through callbacks. For descriptions of the callback functions, see gluTessCallback.
Note The gluBeginPolygon and gluEndPolygon functions are obsolete and are provided for backward compatibility only. The gluBeginPolygon function is mapped to gluTessBeginPolygon followed by gluTessBeginContour; gluEndPolygon is mapped to gluTessEndPolygon followed by gluTessEndContour.
The following example describes a quadrilateral with a triangular hole:
gluBeginPolygon(tess);
gluTessVertex(tess, v1, v1);
gluTessVertex(tess, v2, v2);
gluTessVertex(tess, v3, v3);
gluTessVertex(tess, v4, v4);
gluNextContour(tess, GLU_INTERIOR);
gluTessVertex(tess, v5, v5);
gluTessVertex(tess, v6, v6);
gluTessVertex(tess, v7, v7);
gluEndPolygon(tess);
Windows NT: Use version 3.5 and later.
Windows: Use Windows 95 and later.
Windows CE: Unsupported.
Header: Declared in glu.h.
Import Library: Link with glu32.lib.
gluNewTess, gluNextContour, gluTessBeginContour, gluTessBeginPolygon, gluTessCallback, gluTessVertex