Export (0) Print
Expand All

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 pointer passed back to the program 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 program 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); 

Requirements

  Windows NT/2000: Requires Windows NT 3.5 or later.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in Glu.h.
  Library: Use Glu32.lib.

See Also

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


  

Community Additions

Show:
© 2014 Microsoft