rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man2 / gluBeginPolygon.xml
CommitLineData
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="gluBeginPolygon">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>1991-2006</year>
9 <holder>Silicon Graphics, Inc.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>gluBeginPolygon</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>gluBeginPolygon</refname>
17 <refpurpose>delimit a polygon description</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>gluBeginPolygon</function></funcdef>
23 <paramdef>GLUtesselator* <parameter>tess</parameter></paramdef>
24 </funcprototype>
25 </funcsynopsis>
26 </refsynopsisdiv>
27 <refsynopsisdiv><title>C Specification</title>
28 <funcsynopsis>
29 <funcprototype>
30 <funcdef>void <function>gluEndPolygon</function></funcdef>
31 <paramdef>GLUtesselator* <parameter>tess</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>tess</parameter></term>
40 <listitem>
41 <para>
42 Specifies the tessellation object (created with <citerefentry><refentrytitle>gluNewTess</refentrytitle></citerefentry>).
43 </para>
44 </listitem>
45 </varlistentry>
46 </variablelist>
47 </refsect1>
48 <refsect1 id="description"><title>Description</title>
49 <para>
50 <function>gluBeginPolygon</function> and <citerefentry><refentrytitle>gluEndPolygon</refentrytitle></citerefentry> delimit the definition of a
51 nonconvex polygon.
52 To define such a polygon, first call <function>gluBeginPolygon</function>.
53 Then define the contours of the polygon
54 by calling
55 <citerefentry><refentrytitle>gluTessVertex</refentrytitle></citerefentry> for each vertex
56 and <citerefentry><refentrytitle>gluNextContour</refentrytitle></citerefentry> to start each new contour.
57 Finally, call <citerefentry><refentrytitle>gluEndPolygon</refentrytitle></citerefentry>
58 to signal the end of the definition.
59 See the <citerefentry><refentrytitle>gluTessVertex</refentrytitle></citerefentry> and
60 <citerefentry><refentrytitle>gluNextContour</refentrytitle></citerefentry> reference pages for more details.
61 </para>
62 <para>
63 Once <citerefentry><refentrytitle>gluEndPolygon</refentrytitle></citerefentry> is called, the polygon is tessellated, and the
64 resulting triangles are described through callbacks.
65 See <citerefentry><refentrytitle>gluTessCallback</refentrytitle></citerefentry> for descriptions of the callback functions.
66 </para>
67 </refsect1>
68 <refsect1 id="notes"><title>Notes</title>
69 <para>
70 This command is obsolete and is provided for backward compatibility
71 only. Calls to <function>gluBeginPolygon</function> are mapped to
72 <citerefentry><refentrytitle>gluTessBeginPolygon</refentrytitle></citerefentry>
73 followed by
74 <citerefentry><refentrytitle>gluTessBeginContour</refentrytitle></citerefentry>. Calls to <citerefentry><refentrytitle>gluEndPolygon</refentrytitle></citerefentry> are mapped
75 to <citerefentry><refentrytitle>gluTessEndContour</refentrytitle></citerefentry> followed by <citerefentry><refentrytitle>gluTessEndPolygon</refentrytitle></citerefentry>.
76 </para>
77 </refsect1>
78 <refsect1 id="example"><title>Example</title>
79 <para>
80 A quadrilateral with a triangular hole in it can be described like this:
81 <programlisting>
82gluBeginPolygon(tobj);
83 gluTessVertex(tobj, v1, v1);
84 gluTessVertex(tobj, v2, v2);
85 gluTessVertex(tobj, v3, v3);
86 gluTessVertex(tobj, v4, v4);
87gluNextContour(tobj, GLU_INTERIOR);
88 gluTessVertex(tobj, v5, v5);
89 gluTessVertex(tobj, v6, v6);
90 gluTessVertex(tobj, v7, v7);
91gluEndPolygon(tobj);
92 </programlisting>
93 </para>
94 </refsect1>
95 <refsect1 id="seealso"><title>See Also</title>
96 <para>
97 <citerefentry><refentrytitle>gluNewTess</refentrytitle></citerefentry>,
98 <citerefentry><refentrytitle>gluNextContour</refentrytitle></citerefentry>,
99 <citerefentry><refentrytitle>gluTessBeginContour</refentrytitle></citerefentry>,
100 <citerefentry><refentrytitle>gluTessBeginPolygon</refentrytitle></citerefentry>,
101 <citerefentry><refentrytitle>gluTessCallback</refentrytitle></citerefentry>,
102 <citerefentry><refentrytitle>gluTessVertex</refentrytitle></citerefentry>
103 </para>
104 </refsect1>
105 <refsect1 id="Copyright"><title>Copyright</title>
106 <para>
107 Copyright <trademark class="copyright"></trademark> 1991-2006
108 Silicon Graphics, Inc. This document is licensed under the SGI
109 Free Software B License. For details, see
110 <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
111 </para>
112 </refsect1>
113</refentry>