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=
"gluTessBeginPolygon">
9 <holder>Silicon Graphics, Inc.
</holder>
12 <refentrytitle>gluTessBeginPolygon
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>gluTessBeginPolygon
</refname>
17 <refpurpose>delimit a polygon description
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>void
<function>gluTessBeginPolygon
</function></funcdef>
23 <paramdef>GLUtesselator*
<parameter>tess
</parameter></paramdef>
24 <paramdef>GLvoid*
<parameter>data
</parameter></paramdef>
28 <!-- eqn: ignoring delim $$ -->
29 <refsect1 id=
"parameters"><title>Parameters
</title>
32 <term><parameter>tess
</parameter></term>
35 Specifies the tessellation object (created with
<citerefentry><refentrytitle>gluNewTess
</refentrytitle></citerefentry>).
40 <term><parameter>data
</parameter></term>
43 Specifies a pointer to user polygon data.
49 <refsect1 id=
"description"><title>Description
</title>
51 <function>gluTessBeginPolygon
</function> and
<citerefentry><refentrytitle>gluTessEndPolygon
</refentrytitle></citerefentry> delimit the definition of a
52 convex, concave or self-intersecting polygon. Within each
<function>gluTessBeginPolygon
</function>/
<citerefentry><refentrytitle>gluTessEndPolygon
</refentrytitle></citerefentry>
53 pair, there must be one or more calls to
<citerefentry><refentrytitle>gluTessBeginContour
</refentrytitle></citerefentry>/
<citerefentry><refentrytitle>gluTessEndContour
</refentrytitle></citerefentry>.
54 Within each contour, there are zero or more calls to
<citerefentry><refentrytitle>gluTessVertex
</refentrytitle></citerefentry>. The vertices
55 specify a closed contour (the last vertex of each contour is automatically linked
56 to the first). See the
<citerefentry><refentrytitle>gluTessVertex
</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>gluTessBeginContour
</refentrytitle></citerefentry>, and
57 <citerefentry><refentrytitle>gluTessEndContour
</refentrytitle></citerefentry> reference pages for more details.
60 <parameter>data
</parameter> is a pointer to a user-defined data structure. If the appropriate callback(s)
61 are specified (see
<citerefentry><refentrytitle>gluTessCallback
</refentrytitle></citerefentry>), then this pointer is returned to the
62 callback function(s). Thus, it is a convenient way to store per-polygon information.
65 Once
<citerefentry><refentrytitle>gluTessEndPolygon
</refentrytitle></citerefentry> is called, the polygon is tessellated, and the
66 resulting triangles are described through callbacks.
67 See
<citerefentry><refentrytitle>gluTessCallback
</refentrytitle></citerefentry> for descriptions of the callback functions.
70 <refsect1 id=
"example"><title>Example
</title>
72 A quadrilateral with a triangular hole in it can be described as follows:
74 gluTessBeginPolygon(tobj, NULL);
75 gluTessBeginContour(tobj);
76 gluTessVertex(tobj, v1, v1);
77 gluTessVertex(tobj, v2, v2);
78 gluTessVertex(tobj, v3, v3);
79 gluTessVertex(tobj, v4, v4);
80 gluTessEndContour(tobj);
81 gluTessBeginContour(tobj);
82 gluTessVertex(tobj, v5, v5);
83 gluTessVertex(tobj, v6, v6);
84 gluTessVertex(tobj, v7, v7);
85 gluTessEndContour(tobj);
86 gluTessEndPolygon(tobj);
92 <refsect1 id=
"seealso"><title>See Also
</title>
94 <citerefentry><refentrytitle>gluNewTess
</refentrytitle></citerefentry>,
95 <citerefentry><refentrytitle>gluTessBeginContour
</refentrytitle></citerefentry>,
96 <citerefentry><refentrytitle>gluTessCallback
</refentrytitle></citerefentry>,
97 <citerefentry><refentrytitle>gluTessEndPolygon
</refentrytitle></citerefentry>,
98 <citerefentry><refentrytitle>gluTessNormal
</refentrytitle></citerefentry>,
99 <citerefentry><refentrytitle>gluTessProperty
</refentrytitle></citerefentry>,
100 <citerefentry><refentrytitle>gluTessVertex
</refentrytitle></citerefentry>
103 <refsect1 id=
"Copyright"><title>Copyright
</title>
105 Copyright
<trademark class=
"copyright"></trademark> 1991-
2006
106 Silicon Graphics, Inc. This document is licensed under the SGI
107 Free Software B License. For details, see
108 <ulink url=
"http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/
</ulink>.