GLUNURBSSURFACE(3G)
๐ NAME ๐
okay bestie, meet gluNurbsSurface โ she defines the shape of a NURBS surface. that's it, that's the job. ๐
๐ C SPECIFICATION ๐
fr fr, here's exactly how you call her:
void gluNurbsSurface( GLUnurbs* nurb,
GLint sKnotCount,
GLfloat* sKnots,
GLint tKnotCount,
GLfloat* tKnots,
GLint sStride,
GLint tStride,
GLfloat* control,
GLint sOrder,
GLint tOrder,
GLenum type )
โจ PARAMETERS โจ
nurbโ the NURBS object in question, aka the one you made withgluNewNurbsRenderer. your girl. ๐ซถsKnotCountโ how many knots live in the parametric u direction.sKnotsโ an array ofsKnotCountnondecreasing knot values in the parametric u direction. nondecreasing, okay? don't be chaotic.tKnotCountโ how many knots live in the parametric v direction.tKnotsโ an array oftKnotCountnondecreasing knot values in the parametric v direction.sStrideโ the offset (counted as a number of single-precision floating point values) between successive control points in the parametric u direction, insidecontrol.tStrideโ the offset (in single-precision floating-point values) between successive control points in the parametric v direction, insidecontrol.controlโ the array holding all the control points for the NURBS surface. the offsets between successive control points in the parametric u and v directions? those come fromsStrideandtStride.sOrderโ the order of the NURBS surface in the parametric u direction. heads up, the order is one more than the degree, so a surface that's cubic in u has a u order of4. iconic math.tOrderโ the order of the NURBS surface in the parametric v direction. same deal: order is one more than the degree, so a surface cubic in v has a v order of4.typeโ the type of the surface.typecan be any of the valid two-dimensional evaluator types (likeGL_MAP2_VERTEX_3orGL_MAP2_COLOR_4). so many options, so little time. ๐
๐ธ DESCRIPTION ๐ธ
Use gluNurbsSurface inside a NURBS (Non-Uniform Rational B-Spline) surface definition to describe the shape of a NURBS surface (before any trimming happens, btw). To mark the beginning of a NURBS surface definition, use the gluBeginSurface command. To mark the end of a NURBS surface definition, use the gluEndSurface command. And listen: call gluNurbsSurface within a NURBS surface definition only. that's the vibe check. ๐ซ
Positional, texture, and color coordinates get associated with a surface by presenting each as a separate gluNurbsSurface between a gluBeginSurface/gluEndSurface pair. No more than one call to gluNurbsSurface for each of color, position, and texture data can be made within a single gluBeginSurface/gluEndSurface pair. Exactly one call must be made to describe the position of the surface (a type of GL_MAP2_VERTEX_3 or GL_MAP2_VERTEX_4). one. not zero, not two. one. ๐ค
A NURBS surface can be trimmed by using the commands gluNurbsCurve and gluPwlCurve between calls to gluBeginTrim and gluEndTrim. โ๏ธ
Note that a gluNurbsSurface with sKnotCount knots in the u direction and tKnotCount knots in the v direction with orders sOrder and tOrder must have (sKnotCount - sOrder) ร (tKnotCount - tOrder) control points. do the math bestie, she's not flexible on this. ๐งฎ
๐ฆ EXAMPLE ๐ฆ
these commands render a textured NURBS surface with normals, and 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);
ate. no crumbs. ๐ฅ
๐ SEE ALSO ๐
gluBeginSurface(3G)gluBeginTrim(3G)gluNewNurbsRenderer(3G)gluNurbsCurve(3G)gluPwlCurve(3G)
go read those too, they're all in the same friend group. ๐
okay that's the whole page, and this lil cutie is signed GLUNURBSSURFACE(3G) โ that's her name in the footer, living her best life at the bottom of the manual. periodt. ๐โจ๐ฆ
๐ฆ where this page comes from
- centos-stream 9: gl-manpages 1.1-24.20190306.el9 ยท MIT and Open Publication
- fedora 43: gl-manpages 1.1-34.20190306.fc43 ยท Apache-2.0 AND HPND AND HPND-sell-variant AND MIT AND OpenPBS-2.3 AND SGI-B-2.0 AND W3C-19980720 AND X11
- fedora 44: gl-manpages 1.1-35.20190306.fc44 ยท Apache-2.0 AND HPND AND HPND-sell-variant AND MIT AND OpenPBS-2.3 AND SGI-B-2.0 AND W3C-19980720 AND X11
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms