GLUBEGINCURVE(3G)
π GLUBEGINCURVE β bestie, we're drawing a NURBS curve π
okay so this is page GLUBEGINCURVE from the 3G manual section, and it's a two-for-one deal: gluBeginCurve and gluEndCurve, the lil matched set that opens and closes a NURBS curve definition. they're the parentheses of the curve world fr fr π
β¨ NAME β¨
gluBeginCurve, gluEndCurve β delimit a NURBS curve definition π
πΈ C SPECIFICATION πΈ
void gluBeginCurve( GLUnurbs* nurb )
void gluEndCurve( GLUnurbs* nurb )
π¦ PARAMETERS π¦
nurbβ Specifies the NURBS object (created withgluNewNurbsRenderer). it's your lil NURBS bestie, you gotta make it first withgluNewNurbsRendereror there's nothing to hold onto π«Ά
π DESCRIPTION π
ok so gluBeginCurve is literally just the "hey we're starting a NURBS curve definition now" flag. that's the whole job. queen of setting the scene β¨
after you call gluBeginCurve, you go make one or more calls to gluNurbsCurve to define the attributes of the curve. and here's the non-negotiable part, no cap: exactly one of those gluNurbsCurve calls has to have a curve type of GL_MAP1_VERTEX_3 or GL_MAP1_VERTEX_4. exactly one. not zero, not two. one. π
then to mark the end of the NURBS curve definition, you call gluEndCurve. close the loop, wrap it up, periodt π
GL evaluators are what actually do the rendering here β they render the NURBS curve as a series of line segments. and while that's happening, evaluator state is preserved with glPushAttrib(GL_EVAL_BIT) and glPopAttrib(). if you wanna know exactly which state those calls preserve, go read the glPushAttrib reference page, she's got the receipts π
π EXAMPLE π
the following commands render a textured NURBS curve with normals; texture coordinates and normals are also specified as NURBS curves π
gluBeginCurve(nobj);
gluNurbsCurve(nobj, ..., GL_MAP1_TEXTURE_COORD_2);
gluNurbsCurve(nobj, ..., GL_MAP1_NORMAL);
gluNurbsCurve(nobj, ..., GL_MAP1_VERTEX_4); gluEndCurve(nobj);
see that? three gluNurbsCurve calls, and the vertex one is there β GL_MAP1_VERTEX_4 β so we're valid π
π SEE ALSO π
gluBeginSurface(3G),gluBeginTrim(3G),gluNewNurbsRenderer(3G),gluNurbsCurve(3G),glPopAttrib(3G),glPushAttrib(3G)
and that's the whole page bestie!! this was GLUBEGINCURVE(3G), straight out of the 3G manual, and honestly? iconic. go forth and close your curves properly, mwah πβ¨π
π¦ 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