The gluNurbsSurface function defines the shape of a NURBS surface.
void gluNurbsSurface(
GLUnurbsObj * nobj,
GLint sknot_count,
GLfloat * sknot,
GLint tknot_count,
GLfloat * tknot,
GLint s_stride,
GLint t_stride,
GLfloat * ctlarray,
GLint sorder,
GLint torder,
GLenum type
);
Use gluNurbsSurface within a NURBS (Non-Uniform Rational B-Spline) surface definition to describe the shape of a NURBS surface (before any trimming). To mark the beginning of a NURBS surface definition, use the gluBeginSurface function. To mark the end of a NURBS surface definition, use the gluEndSurface function. Call gluNurbsSurface within a NURBS surface definition only.
You associate positional, texture, and color coordinates with a surface by presenting each as a separate gluNurbsSurface between a gluBeginSurface/gluEndSurface pair. Within a single gluBeginSurface/gluEndSurface pair, you can make only one call to gluNurbsSurface for color, position, and texture data. Make exactly one call to describe the position of the surface (a type of GL_MAP2_VERTEX_3 or GL_MAP2_VERTEX_4).
You can trim a NURBS surface by using the gluNurbsCurve and gluPwlCurve functions between calls to gluBeginTrim and gluEndTrim.
Note A gluNurbsSurface with sknot_count knots in the u direction and tknot_count knots in the v direction with orders sorder and torder must have (sknot_count - sorder) multipied by (tknot_count - torder) control points.
The following functions render a textured NURBS surface with normals; the texture coordinates and normals are also NURBS surfaces:
gluBeginSurface(nobj);
gluNurbsSurface(nobj, . . ., GL_MAP2_TEXTURE_COORD_2);
gluNurbsSurface(nobj, . . ., GL_MAP2_NORMAL);
gluNurbsSurface(nobj, . . ., GL_MAP2_VERTEX_4);
gluEndSurface(nobj);
Windows NT: Use version 3.5 and later.
Windows: Use Windows 95 and later.
Windows CE: Unsupported.
Header: Declared in glu.h.
Import Library: Link with glu32.lib.
gluBeginSurface, gluBeginTrim, gluEndSurface, gluEndTrim, gluNewNurbsRenderer, gluNurbsCurve, gluPwlCurve