gluTessVertex  1SKL_VJ

[New - Windows 95, OEM Service Release 2]

The gluTessVertex function specifies a vertex on a polygon.

void gluTessVertex(

    GLUtesselator * tess,

 

    GLdouble coords[3],

 

    void * data

 

   );

 

 

Parameters

tess

The tessellation object (created with gluNewTessCIEF84).

coords

The location of the vertex.

data

An opaque pointer passed back to the user with the vertex callback (as specified by gluTessCallback5E3CP).

 

Remarks

The gluTessVertex function describes a vertex on a polygon that the user is defining. Successive gluTessVertex calls describe a closed contour. For example, to describe a quadrilateral, call gluTessVertex four times. You can only call gluTessVertex between gluTessBeginContourE5GOS7 and gluTessEndContourE5GOS7.

The data parameter normally points to a structure containing the vertex location, as well as other per-vertex attributes such as color and normal. This pointer is passed back to the user through the GLU_VERTEX callback after tessellation (see gluTessCallback5E3CP).

Example

The following describes a quadrilateral with a triangular hole:

gluTessBeginPolygon(tess, NULL);

  gluTessBeginContour(tess);

    gluTessVertex(tess, v1, v1);

    gluTessVertex(tess, v2, v2);

    gluTessVertex(tess, v3, v3);

    gluTessVertex(tess, v4, v4);

  gluTessEndContour(tess); 

gluNextContour(tess, GLU_INTERIOR);

  gluTessBeginContour(tess);

    gluTessVertex(tess, v5, v5);

    gluTessVertex(tess, v6, v6);

    gluTessVertex(tess, v7, v7); 

  gluTessEndContour(tess);

gluTessEndPolygon(tess);

 

See Also

, , gluTessBeginContour, gluTessBeginPolygon, gluTessCallback, gluTessEndContour, gluTessNormal, gluTessProperty