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=
"gluTessEndPolygon">
9 <holder>Silicon Graphics, Inc.
</holder>
12 <refentrytitle>gluTessEndPolygon
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>gluTessEndPolygon
</refname>
17 <refpurpose>delimit a polygon description
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>void
<function>gluTessEndPolygon
</function></funcdef>
23 <paramdef>GLUtesselator*
<parameter>tess
</parameter></paramdef>
27 <!-- eqn: ignoring delim $$ -->
28 <refsect1 id=
"parameters"><title>Parameters
</title>
31 <term><parameter>tess
</parameter></term>
34 Specifies the tessellation object (created with
<citerefentry><refentrytitle>gluNewTess
</refentrytitle></citerefentry>).
40 <refsect1 id=
"description"><title>Description
</title>
42 <citerefentry><refentrytitle>gluTessBeginPolygon
</refentrytitle></citerefentry> and
<function>gluTessEndPolygon
</function> delimit the
43 definition of a convex, concave, or self-intersecting polygon. Within
44 each
<citerefentry><refentrytitle>gluTessBeginPolygon
</refentrytitle></citerefentry>/
<function>gluTessEndPolygon
</function> pair, there must be
45 one or more calls to
<citerefentry><refentrytitle>gluTessBeginContour
</refentrytitle></citerefentry>/
<citerefentry><refentrytitle>gluTessEndContour
</refentrytitle></citerefentry>.
46 Within each contour, there are zero or more calls to
<citerefentry><refentrytitle>gluTessVertex
</refentrytitle></citerefentry>.
47 The vertices specify a closed contour (the last vertex of each contour
48 is automatically linked to the first). See the
<citerefentry><refentrytitle>gluTessVertex
</refentrytitle></citerefentry>,
49 <citerefentry><refentrytitle>gluTessBeginContour
</refentrytitle></citerefentry>, and
<citerefentry><refentrytitle>gluTessEndContour
</refentrytitle></citerefentry> reference pages for
53 Once
<function>gluTessEndPolygon
</function> is called, the polygon is tessellated, and the
54 resulting triangles are described through callbacks.
55 See
<citerefentry><refentrytitle>gluTessCallback
</refentrytitle></citerefentry> for descriptions of the callback functions.
58 <refsect1 id=
"example"><title>Example
</title>
60 A quadrilateral with a triangular hole in it can be described like this:
62 gluTessBeginPolygon(tobj, NULL);
63 gluTessBeginContour(tobj);
64 gluTessVertex(tobj, v1, v1);
65 gluTessVertex(tobj, v2, v2);
66 gluTessVertex(tobj, v3, v3);
67 gluTessVertex(tobj, v4, v4);
68 gluTessEndContour(tobj);
69 gluTessBeginContour(tobj);
70 gluTessVertex(tobj, v5, v5);
71 gluTessVertex(tobj, v6, v6);
72 gluTessVertex(tobj, v7, v7);
73 gluTessEndContour(tobj);
74 gluTessEndPolygon(tobj);
76 In the above example the pointers,
77 <inlineequation><mml:math><mml:mi mathvariant=
"italic">v1
</mml:mi></mml:math></inlineequation>
79 <inlineequation><mml:math><mml:mi mathvariant=
"italic">v7
</mml:mi></mml:math></inlineequation>,
80 should point to different
82 since the values stored at these addresses will not be read by
83 the tesselator until
<function>gluTessEndPolygon
</function> is called.
86 <refsect1 id=
"seealso"><title>See Also
</title>
88 <citerefentry><refentrytitle>gluNewTess
</refentrytitle></citerefentry>,
89 <citerefentry><refentrytitle>gluTessBeginContour
</refentrytitle></citerefentry>,
90 <citerefentry><refentrytitle>gluTessBeginPolygon
</refentrytitle></citerefentry>,
91 <citerefentry><refentrytitle>gluTessCallback
</refentrytitle></citerefentry>,
92 <citerefentry><refentrytitle>gluTessNormal
</refentrytitle></citerefentry>,
93 <citerefentry><refentrytitle>gluTessProperty
</refentrytitle></citerefentry>,
94 <citerefentry><refentrytitle>gluTessVertex
</refentrytitle></citerefentry>
97 <refsect1 id=
"Copyright"><title>Copyright
</title>
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>.