<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd">
<html
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:mml="http://www.w3.org/1998/Math/MathML"
><head><title>gluNurbsProperty</title><link rel="stylesheet" href="style.css" type="text/css"/><meta name="generator" content="DocBook XSL Stylesheets V1.59.1"/><link rel="home" href="index.xml" title="PyOpenGL 2.0.1.07 Man Pages"/><link rel="up" href="reference-GLU.xml" title="GLU"/><link rel="previous" href="gluNurbsCurve.3G.xml" title="gluNurbsCurve"/><link rel="next" href="gluNurbsSurface.3G.xml" title="gluNurbsSurface"/></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gluNurbsProperty</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gluNurbsCurve.3G.xml">Prev</a> </td><th width="60%" align="center">GLU</th><td width="20%" align="right"> <a accesskey="n" href="gluNurbsSurface.3G.xml">Next</a></td></tr></table><hr/></div><div class="refentry" lang="en"><a name="gluNurbsProperty.3G"/><div class="titlepage"/><div class="refnamediv"><a name="gluNurbsProperty.3G-name"/><h2>Name</h2><p>gluNurbsProperty &#8212; set a NURBS property</p></div><div class="refsynopsisdiv"><a name="gluNurbsProperty.3G-c_spec"/><h2>C Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code>void <tt>gluNurbsProperty</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLUnurbs* <i><tt>nurb</tt></i>, GLenum <i><tt>property</tt></i>, GLfloat <i><tt>value</tt></i>);</code></td></tr></table></div><div class="refsynopsisdiv"><a name="gluNurbsProperty.3G-python_spec"/><h2>Python Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code><tt>gluNurbsProperty</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>nurb</tt></i>, <i><tt>property</tt></i>, <i><tt>value</tt></i>) &#8594; <tt>None</tt></code></td></tr></table></div><div class="refsect1" lang="en"><a name="gluNurbsProperty.3G-parameters"/><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><i><tt>nurb</tt></i></span></dt><dd>
						Specifies the NURBS object (created with <a href="gluNewNurbsRenderer.3G.xml"><tt>gluNewNurbsRenderer</tt></a>).
					</dd><dt><span class="term"><i><tt>property</tt></i></span></dt><dd>
						Specifies the property to be set. Valid values are <tt>GLU_SAMPLING_TOLERANCE</tt>,
						<tt>GLU_DISPLAY_MODE</tt>, <tt>GLU_CULLING</tt>,
						<tt>GLU_AUTO_LOAD_MATRIX</tt>, <tt>GLU_PARAMETRIC_TOLERANCE</tt>,
						<tt>GLU_SAMPLING_METHOD</tt>, <tt>GLU_U_STEP</tt>, <tt>GLU_V_STEP</tt>,
						or <tt>GLU_NURBS_MODE</tt>.
					</dd><dt><span class="term"><i><tt>value</tt></i></span></dt><dd>
						Specifies the value of the indicated property. It may be a numeric value, or one of
						<tt>GLU_OUTLINE_POLYGON</tt>, <tt>GLU_FILL</tt>,
						<tt>GLU_OUTLINE_PATCH</tt>, <tt>GL_TRUE</tt>, <tt>GL_FALSE</tt>,
						<tt>GLU_PATH_LENGTH</tt>, <tt>GLU_PARAMETRIC_ERROR</tt>,
						<tt>GLU_DOMAIN_DISTANCE</tt>, <tt>GLU_NURBS_RENDERER</tt>, or
						<tt>GLU_NURBS_TESSELLATOR</tt>.
					</dd></dl></div></div><div class="refsect1" lang="en"><a name="gluNurbsProperty.3G-description"/><h2>Description</h2><p>
			<tt>gluNurbsProperty</tt> is used to control properties stored in a NURBS object. These properties affect
			the way that a NURBS curve is rendered. The accepted values for <i><tt>property</tt></i> are as follows:
		</p><div class="variablelist"><dl><dt><span class="term"><tt>GLU_NURBS_MODE</tt></span></dt><dd>
						<i><tt>value</tt></i> should be set to be either <tt>GLU_NURBS_RENDERER</tt> or
						<tt>GLU_NURBS_TESSELLATOR</tt>. When set to <tt>GLU_NURBS_RENDERER</tt>, NURBS
						objects are tessellated into OpenGL primitives and sent to the pipeline for rendering. When set to
						<tt>GLU_NURBS_TESSELLATOR</tt>, NURBS objects are tessellated into OpenGL primitives but the
						vertices, normals, colors, and/or textures are retrieved back through a callback interface (see
						<a href="gluNurbsCallback.3G.xml">gluNurbsCallback</a>). This allows the user to cache the tessellated results for further processing. The initial
						value is <tt>GLU_NURBS_RENDERER</tt>.
					</dd><dt><span class="term"><tt>GLU_SAMPLING_METHOD</tt></span></dt><dd><p>
						Specifies how a NURBS surface should be tessellated. <i><tt>value</tt></i> may be one of
						<tt>GLU_PATH_LENGTH</tt>, <tt>GLU_PARAMETRIC_ERROR</tt>,
						<tt>GLU_DOMAIN_DISTANCE</tt>, <tt>GLU_OBJECT_PATH_LENGTH</tt>, or
						<tt>GLU_OBJECT_PARAMETRIC_ERROR</tt>. When set to <tt>GLU_PATH_LENGTH</tt>, the
						surface is rendered so that the maximum length, in pixels, of the edges of the tessellation polygons is no
						greater than what is specified by <tt>GLU_SAMPLING_TOLERANCE</tt>.
					</p><p>
						<tt>GLU_PARAMETRIC_ERROR</tt> specifies that the surface is rendered in such a way that the
						value specified by <tt>GLU_PARAMETRIC_TOLERANCE</tt> describes the maximum distance, in pixels,
						between the tessellation polygons and the surfaces they approximate.
					</p><p>
						<tt>GLU_DOMAIN_DISTANCE</tt> allows users to specify, in parametric coordinates, how many
						sample points per unit length are taken in <i><tt>u</tt></i>, <i><tt>v</tt></i> direction.
					</p><p>
						<tt>GLU_OBJECT_PATH_LENGTH</tt> is similar to <tt>GLU_PATH_LENGTH</tt> except that
						it is view independent, that is, the surface is rendered so that the maximum length, in object space, of
						edges of the tessellation polygons is no greater than what is specified by
						<tt>GLU_SAMPLING_TOLERANCE</tt>.
					</p><p>
						<tt>GLU_OBJECT_PARAMETRIC_ERROR</tt> is similar to <tt>GLU_PARAMETRIC_ERROR</tt>
						except that it is view independent, that is, the surface is rendered in such a way that the value specified
						by <tt>GLU_PARAMETRIC_TOLERANCE</tt> describes the maximum distance, in object space, between
						the tessellation polygons and the surfaces they approximate.
					</p><p>
						The initial value of <tt>GLU_SAMPLING_METHOD</tt> is <tt>GLU_PATH_LENGTH</tt>.
					</p></dd><dt><span class="term"><tt>GLU_SAMPLING_TOLERANCE</tt></span></dt><dd>
						Specifies the maximum length, in pixels or in object space length unit, to use when the sampling method is
						set to <tt>GLU_PATH_LENGTH</tt> or <tt>GLU_OBJECT_PATH_LENGTH</tt>. The NURBS code
						is conservative when rendering a curve or surface, so the actual length can be somewhat shorter. The
						initial value is 50.0 pixels.
					</dd><dt><span class="term"><tt>GLU_PARAMETRIC_TOLERANCE</tt></span></dt><dd>
						Specifies the maximum distance, in pixels or in object space length unit, to use when the sampling method
						is <tt>GLU_PARAMETRIC_ERROR</tt> or <tt>GLU_OBJECT_PARAMETRIC_ERROR</tt>. The
						initial value is 0.5.
					</dd><dt><span class="term"><tt>GLU_U_STEP</tt></span></dt><dd>
						Specifies the number of sample points per unit length taken along the <i><tt>u</tt></i> axis in
						parametric coordinates. It is needed when <tt>GLU_SAMPLING_METHOD</tt> is set to
						<tt>GLU_DOMAIN_DISTANCE</tt>. The initial value is 100.
					</dd><dt><span class="term"><tt>GLU_V_STEP</tt></span></dt><dd>
						Specifies the number of sample points per unit length taken along the <i><tt>v</tt></i> axis in
						parametric coordinate. It is needed when <tt>GLU_SAMPLING_METHOD</tt> is set to
						<tt>GLU_DOMAIN_DISTANCE</tt>. The initial value is 100.
					</dd><dt><span class="term"><tt>GLU_DISPLAY_MODE</tt></span></dt><dd><p>
						<i><tt>value</tt></i> can be set to <tt>GLU_OUTLINE_POLYGON</tt>,
						<tt>GLU_FILL</tt>, or <tt>GLU_OUTLINE_PATCH</tt>. When
						<tt>GLU_NURBS_MODE</tt> is set to be <tt>GLU_NURBS_RENDERER</tt>,
						<i><tt>value</tt></i> defines how a NURBS surface should be rendered. When
						<i><tt>value</tt></i> is set to <tt>GLU_FILL</tt>, the surface is rendered as a set of
						polygons. When <i><tt>value</tt></i> is set to <tt>GLU_OUTLINE_POLYGON</tt>, the NURBS
						library draws only the outlines of the polygons created by tessellation. When <i><tt>value</tt></i>
						is set to <tt>GLU_OUTLINE_PATCH</tt> just the outlines of patches and trim curves defined by
						the user are drawn.
					</p><p>
						When <tt>GLU_NURBS_MODE</tt> is set to be <tt>GLU_NURBS_TESSELLATOR</tt>,
						<i><tt>value</tt></i> defines how a NURBS surface should be tessellated. When
						<tt>GLU_DISPLAY_MODE</tt> is set to <tt>GLU_FILL</tt> or
						<tt>GLU_OUTLINE_POLYGON</tt>, the NURBS surface is tessellated into OpenGL triangle primitives
						which can be retrieved back through callback functions. If <tt>GLU_DISPLAY_MODE</tt> is set to
						<tt>GLU_OUTLINE_PATCH</tt>, only the outlines of the patches and trim curves are generated as a
						sequence of line strips which can be retrieved back through callback functions.
					</p><p>
						The initial value is <tt>GLU_FILL</tt>.
					</p></dd><dt><span class="term"><tt>GLU_CULLING</tt></span></dt><dd>
						<i><tt>value</tt></i> is a boolean value that, when set to <tt>GL_TRUE</tt>, indicates
						that a NURBS curve should be discarded prior to tessellation if its control points lie outside the current
						viewport. The initial value is <tt>GL_FALSE</tt>.
					</dd><dt><span class="term"><tt>GLU_AUTO_LOAD_MATRIX</tt></span></dt><dd><p>
						<i><tt>value</tt></i> is a boolean value. When set to <tt>GL_TRUE</tt>, 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 is rendered. Sampling and culling matrices are
						required to determine the tessellation of a NURBS surface into line segments or polygons and to cull a
						NURBS surface if it lies outside the viewport.
					</p><p>
						If this mode is set to <tt>GL_FALSE</tt>, then the program needs to provide a projection
						matrix, a modelview matrix, and a viewport for the NURBS renderer to use to construct sampling and culling
						matrices. This can be done with the <a href="gluLoadSamplingMatrices.3G.xml"><tt>gluLoadSamplingMatrices</tt></a>
						function. This mode is initially set to <tt>GL_TRUE</tt>. Changing it from
						<tt>GL_TRUE</tt> to <tt>GL_FALSE</tt> does not affect the sampling and culling
						matrices until <a href="gluLoadSamplingMatrices.3G.xml"><tt>gluLoadSamplingMatrices</tt></a> is called.
					</p></dd></dl></div></div><div class="refsect1" lang="en"><a name="gluNurbsProperty.3G-notes"/><h2>Notes</h2><p>
			If <tt>GLU_AUTO_LOAD_MATRIX</tt> is true, sampling and culling may be executed incorrectly if NURBS
			routines are compiled into a display list.
		</p><p>
			A <i><tt>property</tt></i> of <tt>GLU_PARAMETRIC_TOLERANCE</tt>,
			<tt>GLU_SAMPLING_METHOD</tt>, <tt>GLU_U_STEP</tt>, or <tt>GLU_V_STEP</tt>, or a
			<i><tt>value</tt></i> of <tt>GLU_PATH_LENGTH</tt>, <tt>GLU_PARAMETRIC_ERROR</tt>,
			<tt>GLU_DOMAIN_DISTANCE</tt> are only available if the GLU version is 1.1 or greater. They are not valid
			parameters in GLU 1.0.
		</p><p>
			<a href="gluGetString.3G.xml"><tt>gluGetString</tt></a> can be used to determine the GLU version.
		</p><p>
			<tt>GLU_NURBS_MODE</tt> is only availble if the GLU version is 1.3 or greater.
		</p><p>
			The <tt>GLU_OBJECT_PATH_LENGTH</tt> and <tt>GLU_OBJECT_PARAMETRIC_ERROR</tt> values for the
			<tt>GLU_SAMPLING_METHOD</tt> property are only available if the GLU version is 1.3 or greater.
		</p></div><div class="refsect1" lang="en"><a name="gluNurbsProperty.3G-see_also"/><h2>See Also</h2><p>
			<span class="simplelist"><a href="gluGetNurbsProperty.3G.xml">gluGetNurbsProperty</a>, <a href="gluLoadSamplingMatrices.3G.xml">gluLoadSamplingMatrices</a>, <a href="gluNewNurbsRenderer.3G.xml">gluNewNurbsRenderer</a>, <a href="gluGetString.3G.xml">gluGetString</a>, <a href="gluNurbsCallback.3G.xml">gluNurbsCallback</a></span>
		</p></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="gluNurbsCurve.3G.xml">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="reference-GLU.xml">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="gluNurbsSurface.3G.xml">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gluNurbsCurve </td><td width="20%" align="center"><a accesskey="h" href="index.xml">Home</a></td><td width="40%" align="right" valign="top"> gluNurbsSurface</td></tr></table></div></body></html>
