Commit | Line | Data |
---|---|---|
7faf1d71 AW |
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd"> |
2 | <!-- saved from url=(0013)about:internet --> | |
3 | <?xml-stylesheet type="text/xsl" href="mathml.xsl"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:pref="http://www.w3.org/2002/Math/preference" pref:renderer="mathplayer-dl"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>gluBeginSurface</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="gluBeginSurface"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>gluBeginSurface — delimit a NURBS surface definition</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">gluBeginSurface</b>(</code></td><td>GLUnurbs* </td><td><var class="pdparam">nurb</var><code>)</code>;</td></tr></table></div></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">gluEndSurface</b>(</code></td><td>GLUnurbs* </td><td><var class="pdparam">nurb</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>nurb</code></em></span></dt><dd><p> | |
4 | Specifies the NURBS object (created with <a class="citerefentry" href="gluNewNurbsRenderer.xml"><span class="citerefentry"><span class="refentrytitle">gluNewNurbsRenderer</span></span></a>). | |
5 | </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p> | |
6 | Use <code class="function">gluBeginSurface</code> to mark the beginning of a NURBS | |
7 | surface definition. After | |
8 | calling <code class="function">gluBeginSurface</code>, make one or more calls to | |
9 | <a class="citerefentry" href="gluNurbsSurface.xml"><span class="citerefentry"><span class="refentrytitle">gluNurbsSurface</span></span></a> to define the attributes of the surface. | |
10 | Exactly one of these calls to <a class="citerefentry" href="gluNurbsSurface.xml"><span class="citerefentry"><span class="refentrytitle">gluNurbsSurface</span></span></a> must have a | |
11 | surface type of <code class="constant">GLU_MAP2_VERTEX_3</code> or <code class="constant">GLU_MAP2_VERTEX_4</code>. | |
12 | To mark the end of the NURBS surface definition, call | |
13 | <a class="citerefentry" href="gluEndSurface.xml"><span class="citerefentry"><span class="refentrytitle">gluEndSurface</span></span></a>. | |
14 | </p><p> | |
15 | Trimming of NURBS surfaces is supported with <a class="citerefentry" href="gluBeginTrim.xml"><span class="citerefentry"><span class="refentrytitle">gluBeginTrim</span></span></a>, | |
16 | <a class="citerefentry" href="gluPwlCurve.xml"><span class="citerefentry"><span class="refentrytitle">gluPwlCurve</span></span></a>, <a class="citerefentry" href="gluNurbsCurve.xml"><span class="citerefentry"><span class="refentrytitle">gluNurbsCurve</span></span></a>, and <a class="citerefentry" href="gluEndTrim.xml"><span class="citerefentry"><span class="refentrytitle">gluEndTrim</span></span></a>. See the | |
17 | <a class="citerefentry" href="gluBeginTrim.xml"><span class="citerefentry"><span class="refentrytitle">gluBeginTrim</span></span></a> reference page for details. | |
18 | </p><p> | |
19 | GL evaluators are used to render the NURBS surface as a set of polygons. | |
20 | Evaluator state is preserved during rendering | |
21 | with <a class="citerefentry" href="glPushAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPushAttrib</span></span></a>(<code class="constant">GLU_EVAL_BIT</code>) and | |
22 | <a class="citerefentry" href="glPopAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPopAttrib</span></span></a>. | |
23 | See the <a class="citerefentry" href="glPushAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPushAttrib</span></span></a> reference page for details on exactly what state | |
24 | these calls preserve. | |
25 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="example"></a><h2>Example</h2><p> | |
26 | The following commands render a textured NURBS surface with normals; | |
27 | the texture coordinates and normals are also described as NURBS surfaces: | |
28 | </p><pre class="programlisting"> | |
29 | gluBeginSurface(nobj); | |
30 | gluNurbsSurface(nobj, ..., GL_MAP2_TEXTURE_COORD_2); | |
31 | gluNurbsSurface(nobj, ..., GL_MAP2_NORMAL); | |
32 | gluNurbsSurface(nobj, ..., GL_MAP2_VERTEX_4); | |
33 | gluEndSurface(nobj); | |
34 | </pre><p> | |
35 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p> | |
36 | <a class="citerefentry" href="gluBeginCurve.xml"><span class="citerefentry"><span class="refentrytitle">gluBeginCurve</span></span></a>, | |
37 | <a class="citerefentry" href="gluBeginTrim.xml"><span class="citerefentry"><span class="refentrytitle">gluBeginTrim</span></span></a>, | |
38 | <a class="citerefentry" href="gluNewNurbsRenderer.xml"><span class="citerefentry"><span class="refentrytitle">gluNewNurbsRenderer</span></span></a>, | |
39 | <a class="citerefentry" href="gluNurbsCurve.xml"><span class="citerefentry"><span class="refentrytitle">gluNurbsCurve</span></span></a>, | |
40 | <a class="citerefentry" href="gluNurbsSurface.xml"><span class="citerefentry"><span class="refentrytitle">gluNurbsSurface</span></span></a>, | |
41 | <a class="citerefentry" href="gluPwlCurve.xml"><span class="citerefentry"><span class="refentrytitle">gluPwlCurve</span></span></a>, | |
42 | <a class="citerefentry" href="glPushAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPushAttrib</span></span></a> | |
43 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p> | |
44 | Copyright <span class="trademark"></span>© 1991-2006 | |
45 | Silicon Graphics, Inc. This document is licensed under the SGI | |
46 | Free Software B License. For details, see | |
47 | <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>. | |
48 | </p></div></div></body></html> |