gluTessEndPolygon function
The gluTessBeginPolygon and gluTessEndPolygon functions delimit a polygon description.
Syntax
void WINAPI gluTessEndPolygon(
GLUtesselator *tess
);
Parameters
-
tess
-
The tessellation object (created with gluNewTess).
Return value
This function does not return a value.
Remarks
The gluTessBeginPolygon and gluTessEndPolygon functions delimit the definition of a nonconvex polygon. Within each gluTessBeginPolygon / gluTessEndPolygon pair, include one or more calls to gluTessBeginContour. Within each contour, there are zero or more calls to gluTessVertex. The vertexes specify a closed contour (the last vertex of each contour is automatically linked to the first).
The polygon_data parameter is a pointer to a programmer-defined data structure. If the appropriate callbacks are specified (see gluTessCallback), this pointer is returned to the callback function or functions, making it a convenient way to store per-polygon information.
When you call gluTessEndPolygon, the polygon is tessellated, and the resulting triangles are described through callbacks. For descriptions of the callback functions, see gluTessCallback.
Examples
The following describes a quadrilateral with a triangular hole:
gluTessBeginPolygon(tobj, NULL);
gluTessBeginContour(tobj);
gluTessVertex(tobj, v1, v1);
gluTessVertex(tobj, v2, v2);
gluTessVertex(tobj, v3, v3);
gluTessVertex(tobj, v4, v4);
gluTessEndContour(tobj);
gluTessBeginContour(tobj);
gluTessVertex(tobj, v5, v5);
gluTessVertex(tobj, v6, v6);
gluTessVertex(tobj, v7, v7);
gluTessEndContour(tobj);
gluTessEndPolygon(tobj);
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
Minimum supported server |
Windows 2000 Server [desktop apps only] |
Header |
|
Library |
|
DLL |
|