Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

gluBeginSurface function

Applies to: desktop apps only

The gluBeginSurface and gluEndSurface functions delimit a Non-Uniform Rational B-Spline (NURBS) surface definition.

Syntax

void WINAPI gluBeginSurface(
  GLUnurbs *nobj
);

Parameters

nobj

The NURBS object (created with gluNewNurbsRenderer).

Return value

This function does not return a value.

Remarks

The gluBeginSurface and gluEndSurface functions mark the beginning and end of NURBS surface definitions, which are defined with calls to gluNurbsSurface.

  1. Call gluBeginSurface to mark the beginning of a NURBS surface definition.
  2. Make one or more calls to gluNurbsSurface to define the attributes of the surface.

    Exactly one of these calls to gluNurbsSurface must have a surface type of GL_MAP2_VERTEX_3 or GL_MAP2_VERTEX_4.

  3. To mark the end of the NURBS surface definition, call gluEndSurface.

The gluBeginTrim, gluPwlCurve, gluNurbsCurve, and gluEndTrim functions support trimming of NURBS surfaces.

Use OpenGL evaluators to render the NURBS surface as a set of polygons. Preserve the evaluator state during rendering with glPushAttrib(GL_EVAL_BIT) and glPopAttrib.

Examples

The following functions render a textured NURBS surface with normals; the texture coordinates and normals are also described 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);

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Glu.h

Library

Glu32.lib

DLL

Glu32.dll

See also

gluBeginCurve
gluBeginTrim
gluNewNurbsRenderer
gluNurbsCurve
gluNurbsSurface
gluPwlCurve

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.