gluTessBeginPolygon,
gluTessEndPolygon
[New
- Windows 95, OEM Service Release 2]
The gluTessBeginPolygon and gluTessEndPolygon
functions delimit a polygon description.
void gluTessBeginPolygon(
GLUtesselator * tess, |
|
void * polygon_data |
|
); |
|
void gluTessEndPolygon(
GLUtesselator * tess |
|
); |
|
Parameters
tess
The
tessellation object (created with gluNewTessCIEF84).
polygon_data
A pointer to
user-defined polygon data.
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/gluTessEndContour
The polygon_data parameter is a pointer to a
user-defined data structure. If the appropriate callbacks are specified (see gluTessCallback
When you call gluTessEndPolygon, the polygon is
tessellated, and the resulting triangles are described through callbacks. For
descriptions of the callback functions, see gluTessCallback
Example
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);
See Also