gluTessVertex

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 gluNewTess).
coords
The location of the vertex.
data
An opaque pointer passed back to the user with the vertex callback (as specified by gluTessCallback).

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 gluTessBeginContour and gluTessEndContour.

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 gluTessCallback).

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

QuickInfo

  Windows NT: Use version 3.5 and later.
  Windows: Use Windows 95 and later.
  Windows CE: Unsupported.
  Header: Declared in glu.h.
  Import Library: Link with glu32.lib.

See Also

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