NAME

gluBeginPolygon, gluEndPolygon - delimit a polygon description

C SPECIFICATION

void gglluuBBeeggiinnPPoollyyggoonn( GLUtesselator* _t_e_s_s )

        

void gglluuEEnnddPPoollyyggoonn( GLUtesselator* _t_e_s_s )


        

delim $$

PARAMETERS

_t_e_s_s
Specifies the tessellation object (created with gglluuNNeewwTTeessss).

DESCRIPTION

gglluuBBeeggiinnPPoollyyggoonn and gglluuEEnnddPPoollyyggoonn delimit the definition of a nonconvex polygon. To define such a polygon, first call gglluuBBeeggiinnPPoollyyggoonn. Then define the contours of the polygon by calling gglluuTTeessssVVeerrtteexx for each vertex and gglluuNNeexxttCCoonnttoouurr to start each new contour. Finally, call gglluuEEnnddPPoollyyggoonn to signal the end of the definition. See the gglluuTTeessssVVeerrtteexx and gglluuNNeexxttCCoonnttoouurr reference pages for more details.

Once gglluuEEnnddPPoollyyggoonn is called, the polygon is tessellated, and the resulting triangles are described through callbacks. See gglluuTTeessssCCaallllbbaacckk for descriptions of the callback functions.

NOTES

This command is obsolete and is provided for backward compatibility only. Calls to gglluuBBeeggiinnPPoollyyggoonn are mapped to gglluuTTeessssBBeeggiinnPPoollyyggoonn followed by gglluuTTeessssBBeeggiinnCCoonnttoouurr. Calls to gglluuEEnnddPPoollyyggoonn are mapped to gglluuTTeessssEEnnddCCoonnttoouurr followed by gglluuTTeessssEEnnddPPoollyyggoonn.

EXAMPLE

A quadrilateral with a triangular hole in it can be described like this:

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);

SEE ALSO

gglluuNNeewwTTeessss((33GG)), gglluuNNeexxttCCoonnttoouurr((33GG)), gglluuTTeessssCCaallllbbaacckk((33GG)), gglluuTTeessssVVeerrtteexx((33GG)), gglluuTTeessssBBeeggiinnPPoollyyggoonn((33GG)), gglluuTTeessssBBeeggiinnCCoonnttoouurr((33GG))