GLUNURBSPROPERTY(3G)
π GLUNURBSPROPERTY β okay bestie, let's talk NURBS properties (3G)
Hiiii so this is the page for gluNurbsProperty from the 3G manual, and honestly? It's giving "tiny function, enormous power." Let's get into it. π¦
β¨ NAME β¨
gluNurbsProperty β set a NURBS property. That's it, that's the whole job. π
β¨ C SPECIFICATION β¨
void gluNurbsProperty( GLUnurbs* nurb,
GLenum property,
GLfloat value )
β¨ PARAMETERS β¨
nurbβ your NURBS object, bestie. The one you made withgluNewNurbsRenderer. If you don't have one of these yet, we have a problem. πpropertyβ which property you're setting. The valid values areGLU_SAMPLING_TOLERANCE,GLU_DISPLAY_MODE,GLU_CULLING,GLU_AUTO_LOAD_MATRIX,GLU_PARAMETRIC_TOLERANCE,GLU_SAMPLING_METHOD,GLU_U_STEP,GLU_V_STEP, orGLU_NURBS_MODE. Pick one, queen. πvalueβ the value for that property. It can be a numeric value, or one ofGLU_OUTLINE_POLYGON,GLU_FILL,GLU_OUTLINE_PATCH,GL_TRUE,GL_FALSE,GLU_PATH_LENGTH,GLU_PARAMETRIC_ERROR,GLU_DOMAIN_DISTANCE,GLU_NURBS_RENDERER, orGLU_NURBS_TESSELLATOR. So like, numbers or vibes. Both valid. β¨
β¨ DESCRIPTION β¨
So gluNurbsProperty is how you control the properties stored inside a NURBS object. These properties decide how a NURBS curve actually gets rendered. The accepted values for property go like this:
GLU_NURBS_MODEβ set this to eitherGLU_NURBS_RENDERERorGLU_NURBS_TESSELLATOR. When it'sGLU_NURBS_RENDERER, NURBS objects get tessellated into OpenGL primitives and sent straight down the pipeline for rendering. When it'sGLU_NURBS_TESSELLATOR, NURBS objects still get tessellated into OpenGL primitives, but the vertices, normals, colors, and/or textures come back to you through a callback interface (seegluNurbsCallback). That means you can cache the tessellated results and do further processing with them. Main character behavior, honestly. π The initial value isGLU_NURBS_RENDERER.GLU_SAMPLING_METHODβ this one decides how a NURBS surface should be tessellated.valuecan be one ofGLU_PATH_LENGTH,GLU_PARAMETRIC_ERROR,GLU_DOMAIN_DISTANCE,GLU_OBJECT_PATH_LENGTH, orGLU_OBJECT_PARAMETRIC_ERROR.- Set it to
GLU_PATH_LENGTHand the surface renders so that the maximum length, in pixels, of the edges of the tessellation polygons is no greater than whateverGLU_SAMPLING_TOLERANCEsays. GLU_PARAMETRIC_ERRORmeans the surface renders so that the value fromGLU_PARAMETRIC_TOLERANCEdescribes the maximum distance, in pixels, between the tessellation polygons and the surfaces they're approximating.GLU_DOMAIN_DISTANCElets you specify, in parametric coordinates, how many sample points per unit length get taken in the u, v direction.GLU_OBJECT_PATH_LENGTHis likeGLU_PATH_LENGTHbut view independent β the surface renders so the maximum length, in object space, of the edges of the tessellation polygons is no greater than whatGLU_SAMPLING_TOLERANCEspecifies.GLU_OBJECT_PARAMETRIC_ERRORis likeGLU_PARAMETRIC_ERRORbut view independent β the surface renders so the value fromGLU_PARAMETRIC_TOLERANCEdescribes the maximum distance, in object space, between the tessellation polygons and the surfaces they approximate.
- Set it to
The initial value of GLU_SAMPLING_METHOD is GLU_PATH_LENGTH. Slay. π
GLU_SAMPLING_TOLERANCEβ the maximum length, in pixels or in object space length unit, to use when the sampling method is set toGLU_PATH_LENGTHorGLU_OBJECT_PATH_LENGTH. Heads up though: the NURBS code is conservative when it renders a curve or surface, so the actual length can come out a little shorter than you asked for. π The initial value is50.0pixels.GLU_PARAMETRIC_TOLERANCEβ the maximum distance, in pixels or in object space length unit, to use when the sampling method isGLU_PARAMETRIC_ERRORorGLU_OBJECT_PARAMETRIC_ERROR. The initial value is0.5.GLU_U_STEPβ how many sample points per unit length get taken along the u axis in parametric coordinates. You need this whenGLU_SAMPLING_METHODis set toGLU_DOMAIN_DISTANCE. The initial value is100.GLU_V_STEPβ how many sample points per unit length get taken along the v axis in parametric coordinate. Also needed whenGLU_SAMPLING_METHODis set toGLU_DOMAIN_DISTANCE. The initial value is100.GLU_DISPLAY_MODEβvaluecan beGLU_OUTLINE_POLYGON,GLU_FILL, orGLU_OUTLINE_PATCH.
When GLU_NURBS_MODE is set to GLU_NURBS_RENDERER, value defines how a NURBS surface should be rendered. Set value to GLU_FILL and the surface renders as a set of polygons. Set value to GLU_OUTLINE_POLYGON and the NURBS library draws only the outlines of the polygons created by tessellation. Set value to GLU_OUTLINE_PATCH and just the outlines of patches and trim curves defined by the user get drawn.
When GLU_NURBS_MODE is set to GLU_NURBS_TESSELLATOR, value defines how a NURBS surface should be tessellated. When GLU_DISPLAY_MODE is GLU_FILL or GLU_OUTLINE_POLYGON, the NURBS surface tessellates into OpenGL triangle primitives that can be retrieved back through callback functions. If GLU_DISPLAY_MODE is GLU_OUTLINE_PATCH, only the outlines of the patches and trim curves get generated, as a sequence of line strips, and those can be retrieved back through callback functions too.
The initial value is GLU_FILL. β¨
GLU_CULLINGβvalueis a boolean. Set it toGL_TRUEand it means a NURBS curve should be discarded before tessellation if its control points lie outside the current viewport. The initial value isGL_FALSE.GLU_AUTO_LOAD_MATRIXβvalueis a boolean. When it'sGL_TRUE, the NURBS code downloads the projection matrix, the modelview matrix, and the viewport from the GL server to compute sampling and culling matrices for each NURBS curve that gets rendered. And you need those sampling and culling matrices to figure out the tessellation of a NURBS surface into line segments or polygons, and to cull a NURBS surface if it lies outside the viewport.
If this mode is set to GL_FALSE, then your program has to provide a projection matrix, a modelview matrix, and a viewport for the NURBS renderer to use to build those sampling and culling matrices. You do that with the gluLoadSamplingMatrices function. This mode is initially set to GL_TRUE. And listen β changing it from GL_TRUE to GL_FALSE does not affect the sampling and culling matrices until gluLoadSamplingMatrices is called. Don't get caught out. π«Ά
β¨ NOTES β¨
If GLU_AUTO_LOAD_MATRIX is true, sampling and culling may be executed incorrectly if NURBS routines are compiled into a display list. So likeβ¦ watch out, bestie. π
A property of GLU_PARAMETRIC_TOLERANCE, GLU_SAMPLING_METHOD, GLU_U_STEP, or GLU_V_STEP, or a value of GLU_PATH_LENGTH, GLU_PARAMETRIC_ERROR, GLU_DOMAIN_DISTANCE are only available if the GLU version is 1.1 or greater. They are not valid parameters in GLU 1.0. Sorry to the 1.0 girlies. π
gluGetString can be used to determine the GLU version β very useful, very iconic, use it. β
GLU_NURBS_MODE is only available if the GLU version is 1.3 or greater.
The GLU_OBJECT_PATH_LENGTH and GLU_OBJECT_PARAMETRIC_ERROR values for the GLU_SAMPLING_METHOD property are only available if the GLU version is 1.3 or greater.
β¨ SEE ALSO β¨
gluGetNurbsProperty(3G)gluLoadSamplingMatrices(3G)gluNewNurbsRenderer(3G)gluGetString(3G)gluNurbsCallback(3G)
Okay that's the whole page, babe β go forth and tessellate responsibly. π This has been GLUNURBSPROPERTY(3G), from the 3G manual section. 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