[ Previous | Next | Contents | Glossary | Home | Search ]
OpenGL 1.1 for AIX: Reference Manual

gluNextContour Subroutine


Marks the beginning of another contour.


OpenGL C bindings library: libGL.a

C Syntax

void gluNextContour(GLUtriangulatorObj *tobj, 
GLenum Type)


The gluNextContour subroutine is used in describing polygons with multiple contours. After describing the first contour through a series of gluTessVertex calls, a gluNextContour call indicates that the previous contour is complete and the next contour is about to begin. Then, another series of gluTessVertex calls is used to describe the new contour. This process can be repeated until all contours are described.

The gluNextContour subroutine can be called before the first contour is described to define the type of the first contour. If gluNextContour is not called before the first contour, the first contour is marked GLU_EXTERIOR.

The type of contour that follows the gluNextContour subroutine is determined by the Type parameter. Acceptable contour types are as follows:

GLU_EXTERIOR Defines an exterior boundary of the polygon.
GLU_INTERIOR Defines an interior boundary of the polygon (such as a hole).
GLU_UNKNOWN Defines an unknown contour that is analyzed by the library to determine if it is interior or exterior.
GLU_CCW or GLU_CW The first GLU_CCW or GLU_CW contour defined is considered to be exterior. All other contours are considered to be exterior if they are oriented in the same direction (clockwise or counterclockwise) as the first contour. If they are not, they are considered interior.
If one contour is of type GLU_CCW or GLU_CW, all contours must be of the same type (if they are not, all GLU_CCW and GLU_CW contours are changed to GLU_UNKNOWN).
There is no real difference between the GLU_CCW and GLU_CW contour types.


tobj Specifies the tessellation object created with the gluNewTess subroutine.
Type Specifies the contour type. Valid values are:
  • GLU_CW


A quadrilateral with a triangular hole in it can be described as follows:

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


/usr/include/GL/gl.h Contains C language constraints, variable type definitions, and ANSI function prototypes for OpenGL.

Related Information

The gluBeginPolygon subroutine, gluNewTess subroutine, gluTessCallback subroutine, gluTessVertex subroutine.

OpenGL Overview.

[ Previous | Next | Contents | Glossary | Home | Search ]