Delimits the beginning or end of a polygon description.
OpenGL C bindings library: libGL.a
void gluBeginPolygon(GLUtesselator* tess)
void gluEndPolygon(GLUtesselator* tess)
The gluBeginPolygon and gluEndPolygon subroutines delimit the definition of a nonconvex polygon. To define a nonconvex polygon, first call the gluBeginPolygon subroutine. Then, call the gluTessVertex subroutine to define the contours of the polygon for each vertex and the gluNextContour subroutine to start each new contour. (See the gluTessVertex subroutine for details about defining a polygon vertex; and the gluNextContour subroutine for details about describing polygons with multiple contours.) Finally, call the gluEndPolygon subroutine to signal the end of the definition.
Once the gluEndPolygon subroutine is called, the polygon is tessellated and the resulting triangles are described through the callbacks. (See the gluTessCallback subroutine for a list of definitions for the callback routines.)
tess | Specifies the tessellation object created with the gluNewTess subroutine. |
This command is obsolete and is provided for backward compatibility only. Calls to gluBeginPolygon are mapped to gluTessBeginPolygon followed by gluTessBeginContour. Calls to gluEndPolygon are mapped to gluTessEndContour followed by gluTessEndPolygon.
A quadrilateral with a triangular hole can be described as follows:
gluBeginPolygon(tobj); gluTessVertex(tobj, v1, v1); gluTessVertex(tobj, v2, v2); gluTessVertex(tobj, v3, v3); gluTessVertex(tobj, v4, v4); gluNextContour(tobj, GLU_INTERIOR); gluTessVertex(tobj, v5, v5); gluTessVertex(tobj, v6, v6); gluTessVertex(tobj, v7, v7); gluEndPolygon(tobj);
/usr/include/GL/gl.h | Contains C language constraints, variable type definitions, and ANSI function prototypes for OpenGL. |
The gluNewTess subroutine, gluNextContour subroutine, gluTessBeginContour subroutine, gluTessBeginPolygon subroutine, gluTessCallback subroutine, gluTessVertex subroutine.