Export (0) Print
Expand All

gluBeginPolygon function

[The gluBeginPolygon function is obsolete and is provided for backward compatibility only. The gluBeginPolygon function is mapped to gluTessBeginPolygon followed by gluTessBeginContour.]

Applies to: desktop apps only

The gluBeginPolygon and gluEndPolygon functions delimit a polygon description.

Syntax

void WINAPI gluBeginPolygon(
  GLUtesselator *tess
);

Parameters

tess

The tessellation object (created with gluNewTess).

Return value

This function does not return a value.

Remarks

Use gluBeginPolygon and gluEndPolygon to delimit the definition of a nonconvex polygon.

  1. Call gluBeginPolygon.
  2. Define the contours of the polygon by calling gluTessVertex for each vertex and gluNextContour to start each new contour.
  3. Call gluEndPolygon to signal the end of the definition.

    Once gluEndPolygon is called, the polygon is tessellated, and the resulting triangles are described through callbacks. For descriptions of the callback functions, see gluTessCallback.

Examples

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

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Glu.h

Library

Glu32.lib

DLL

Glu32.dll

See also

gluNewTess
gluNextContour
gluTessBeginContour
gluTessBeginPolygon
gluTessCallback
gluTessVertex

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

ADD
Show:
© 2014 Microsoft