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

gluBeginSurface or gluEndSurface Subroutine

Purpose

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

Library

OpenGL C bindings library: libGL.a

C Syntax

void gluBeginSurface(GLUnurbsObj *nobj)
void gluEndSurface(GLUnurbsObj *nobj)

Description

Use the gluBeginSurface subroutine to mark the beginning of a NURBS surface definition. After calling the gluBeginSurface subroutine, make one or more calls to the gluNurbsSurface subroutine to define the attributes of the surface. One (and only one) of these calls must have a surface type of GL_MAP2_VERTEX_3 or GL_MAP2_VERTEX_4.

Use the gluEndSurface subroutine to mark the end of the NURBS surface definition.

Trimming of NURBS surfaces is supported with the gluBeginTrim, gluPwlCurve, gluNurbsCurve, and gluEndTrim subroutines. (See the gluBeginTrim subroutine for details about delimiting a NURBS trimming loop.)

OpenGL evaluators render the NURBS surface as a series of polygons. Evaluator state is preserved during rendering with the glPushAttrib (GL_EVAL_BIT) and glPopAttrib attributes. (See the glPushAttrib 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 surface with normals. Texture coordinates and normals are also specified as NURBS surfaces.

gluBeginSurface(nobj);
   gluNurbsSurface(nobj, ..., GL_MAP2_TEXTURE_COORD_2);
   gluNurbsSurface(nobj, ..., GL_MAP2_NORMAL);
   gluNurbsSurface(nobj, ..., GL_MAP2_VERTEX_4); gluEndSurface(nobj);

Files

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

Related Information

The glPushAttrib subroutine, gluBeginCurve subroutine, gluBeginTrim subroutine, gluNewNurbsRenderer subroutine, gluNurbsCurve subroutine, gluNurbsSurface subroutine, gluPwlCurve subroutine.

OpenGL Overview.


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