Commit | Line | Data |
---|---|---|
7faf1d71 AW |
1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN" | |
3 | "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd"> | |
4 | <refentry id="gluBeginSurface"> | |
5 | <refmeta> | |
6 | <refmetainfo> | |
7 | <copyright> | |
8 | <year>1991-2006</year> | |
9 | <holder>Silicon Graphics, Inc.</holder> | |
10 | </copyright> | |
11 | </refmetainfo> | |
12 | <refentrytitle>gluBeginSurface</refentrytitle> | |
13 | <manvolnum>3G</manvolnum> | |
14 | </refmeta> | |
15 | <refnamediv> | |
16 | <refname>gluBeginSurface</refname> | |
17 | <refpurpose>delimit a NURBS surface definition</refpurpose> | |
18 | </refnamediv> | |
19 | <refsynopsisdiv><title>C Specification</title> | |
20 | <funcsynopsis> | |
21 | <funcprototype> | |
22 | <funcdef>void <function>gluBeginSurface</function></funcdef> | |
23 | <paramdef>GLUnurbs* <parameter>nurb</parameter></paramdef> | |
24 | </funcprototype> | |
25 | </funcsynopsis> | |
26 | </refsynopsisdiv> | |
27 | <refsynopsisdiv><title>C Specification</title> | |
28 | <funcsynopsis> | |
29 | <funcprototype> | |
30 | <funcdef>void <function>gluEndSurface</function></funcdef> | |
31 | <paramdef>GLUnurbs* <parameter>nurb</parameter></paramdef> | |
32 | </funcprototype> | |
33 | </funcsynopsis> | |
34 | </refsynopsisdiv> | |
35 | <!-- eqn: ignoring delim $$ --> | |
36 | <refsect1 id="parameters"><title>Parameters</title> | |
37 | <variablelist> | |
38 | <varlistentry> | |
39 | <term><parameter>nurb</parameter></term> | |
40 | <listitem> | |
41 | <para> | |
42 | Specifies the NURBS object (created with <citerefentry><refentrytitle>gluNewNurbsRenderer</refentrytitle></citerefentry>). | |
43 | </para> | |
44 | </listitem> | |
45 | </varlistentry> | |
46 | </variablelist> | |
47 | </refsect1> | |
48 | <refsect1 id="description"><title>Description</title> | |
49 | <para> | |
50 | Use <function>gluBeginSurface</function> to mark the beginning of a NURBS | |
51 | surface definition. After | |
52 | calling <function>gluBeginSurface</function>, make one or more calls to | |
53 | <citerefentry><refentrytitle>gluNurbsSurface</refentrytitle></citerefentry> to define the attributes of the surface. | |
54 | Exactly one of these calls to <citerefentry><refentrytitle>gluNurbsSurface</refentrytitle></citerefentry> must have a | |
55 | surface type of <constant>GLU_MAP2_VERTEX_3</constant> or <constant>GLU_MAP2_VERTEX_4</constant>. | |
56 | To mark the end of the NURBS surface definition, call | |
57 | <citerefentry><refentrytitle>gluEndSurface</refentrytitle></citerefentry>. | |
58 | </para> | |
59 | <para> | |
60 | Trimming of NURBS surfaces is supported with <citerefentry><refentrytitle>gluBeginTrim</refentrytitle></citerefentry>, | |
61 | <citerefentry><refentrytitle>gluPwlCurve</refentrytitle></citerefentry>, <citerefentry><refentrytitle>gluNurbsCurve</refentrytitle></citerefentry>, and <citerefentry><refentrytitle>gluEndTrim</refentrytitle></citerefentry>. See the | |
62 | <citerefentry><refentrytitle>gluBeginTrim</refentrytitle></citerefentry> reference page for details. | |
63 | </para> | |
64 | <para> | |
65 | GL evaluators are used to render the NURBS surface as a set of polygons. | |
66 | Evaluator state is preserved during rendering | |
67 | with <citerefentry><refentrytitle>glPushAttrib</refentrytitle></citerefentry>(<constant>GLU_EVAL_BIT</constant>) and | |
68 | <citerefentry><refentrytitle>glPopAttrib</refentrytitle></citerefentry>. | |
69 | See the <citerefentry><refentrytitle>glPushAttrib</refentrytitle></citerefentry> reference page for details on exactly what state | |
70 | these calls preserve. | |
71 | </para> | |
72 | </refsect1> | |
73 | <refsect1 id="example"><title>Example</title> | |
74 | <para> | |
75 | The following commands render a textured NURBS surface with normals; | |
76 | the texture coordinates and normals are also described as NURBS surfaces: | |
77 | <programlisting> | |
78 | gluBeginSurface(nobj); | |
79 | gluNurbsSurface(nobj, ..., GL_MAP2_TEXTURE_COORD_2); | |
80 | gluNurbsSurface(nobj, ..., GL_MAP2_NORMAL); | |
81 | gluNurbsSurface(nobj, ..., GL_MAP2_VERTEX_4); | |
82 | gluEndSurface(nobj); | |
83 | </programlisting> | |
84 | </para> | |
85 | </refsect1> | |
86 | <refsect1 id="seealso"><title>See Also</title> | |
87 | <para> | |
88 | <citerefentry><refentrytitle>gluBeginCurve</refentrytitle></citerefentry>, | |
89 | <citerefentry><refentrytitle>gluBeginTrim</refentrytitle></citerefentry>, | |
90 | <citerefentry><refentrytitle>gluNewNurbsRenderer</refentrytitle></citerefentry>, | |
91 | <citerefentry><refentrytitle>gluNurbsCurve</refentrytitle></citerefentry>, | |
92 | <citerefentry><refentrytitle>gluNurbsSurface</refentrytitle></citerefentry>, | |
93 | <citerefentry><refentrytitle>gluPwlCurve</refentrytitle></citerefentry>, | |
94 | <citerefentry><refentrytitle>glPushAttrib</refentrytitle></citerefentry> | |
95 | </para> | |
96 | </refsect1> | |
97 | <refsect1 id="Copyright"><title>Copyright</title> | |
98 | <para> | |
99 | Copyright <trademark class="copyright"></trademark> 1991-2006 | |
100 | Silicon Graphics, Inc. This document is licensed under the SGI | |
101 | Free Software B License. For details, see | |
102 | <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>. | |
103 | </para> | |
104 | </refsect1> | |
105 | </refentry> |