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

gluBeginCurve or gluEndCurve Subroutine

Purpose

Delimits the beginning or end of a non-uniform rational B-spline (NURBS) curve definition.

Library

OpenGL C bindings library: libGL.a

C Syntax

void gluBeginCurve(GLUnurbsObj *nobj)
void gluEndCurve(GLUnurbsObj *nobj)

Description

Use the gluBeginCurve subroutine to mark the beginning of a NURBS curve definition. After calling the gluBeginCurve subroutine, make one or more calls to the gluNurbsCurve subroutine to define the attributes of the curve. One (and only one) of these calls must have a curve type of GL_MAP1_VERTEX_3 or GL_MAP1_VERTEX_4.

Use the gluEndCurve subroutine to mark the end of the NURBS curve definition.

OpenGL evaluators render the NURBS curve as a series of line segments. Evaluator state is preserved during rendering with the glPushAttrib(GL_EVAL_BIT) and glPopAttrib attributes. (See the glPushAttrib subroutine for details on what state these calls preserve.)

Parameters

nobj Specifies the NURBS object created with the gluNewNurbsRenderer subroutine.

Examples

The following commands render a textured NURBS curve with normals. Texture coordinates and normals are also specified as NURBS curves.

gluBeginCurve(nobj);
   gluNurbsCurve(nobj, ..., GL_MAP1_TEXTURE_COORD_2);
   gluNurbsCurve(nobj, ..., GL_MAP1_NORMAL);
   gluNurbsCurve(nobj, ..., GL_MAP1_VERTEX_4);
gluEndCurve(nobj);

Files

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

Related Information

The glPushAttrib or glPopAttrib subroutine, gluBeginSurface subroutine, gluBeginTrim subroutine, gluNewNurbsRenderer subroutine, gluNurbsCurve subroutine.

OpenGL Overview.


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