Tao.OpenGl SDK Documentation

Glu.gluBeginSurface Method 

Delimits a NURBS surface definition.

[Visual Basic]
Public Shared Sub gluBeginSurface( _
   ByVal nurb As GLUnurbs _
)
[C#]
public static void gluBeginSurface(
   GLUnurbs nurb
);

Parameters

nurb
The NURBS object (created with gluNewNurbsRenderer).

Remarks

Use gluBeginSurface to mark the beginning of a NURBS surface definition. After calling gluBeginSurface, 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. To mark the end of the NURBS surface definition, call gluEndSurface.

Trimming of NURBS surfaces is supported with gluBeginTrim, gluPwlCurve, gluNurbsCurve, and gluEndTrim. See the gluBeginTrim reference page for details.

OpenGL evaluators are used to render the NURBS surface as a set of polygons. Evaluator state is preserved during rendering with Gl.glPushAttrib(Gl.GL_EVAL_BIT) and Gl.glPopAttrib(). See the glPushAttrib reference page for details on exactly what state these calls preserve.

EXAMPLE

The following commands render a textured NURBS surface with normals; the texture coordinates and normals are also described as NURBS surfaces:

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

See Also

Glu Class | Tao.OpenGl Namespace | gluBeginCurve | gluBeginTrim | gluNewNurbsRenderer | gluNurbsCurve | gluPwlCurve