include more low-level bindings
[clinton/guile-figl.git] / upstream-man-pages / man3 / glPolygonMode.xml
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="glPolygonMode">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>1991-2006</year>
9 <holder>Silicon Graphics, Inc.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glPolygonMode</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glPolygonMode</refname>
17 <refpurpose>select a polygon rasterization mode</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glPolygonMode</function></funcdef>
23 <paramdef>GLenum <parameter>face</parameter></paramdef>
24 <paramdef>GLenum <parameter>mode</parameter></paramdef>
25 </funcprototype>
26 </funcsynopsis>
27 </refsynopsisdiv>
28 <refsect1 id="parameters"><title>Parameters</title>
29 <variablelist>
30 <varlistentry>
31 <term><parameter>face</parameter></term>
32 <listitem>
33 <para>
34 Specifies the polygons that <parameter>mode</parameter> applies to.
35 Must be <constant>GL_FRONT_AND_BACK</constant> for front- and back-facing polygons.
36 </para>
37 </listitem>
38 </varlistentry>
39 <varlistentry>
40 <term><parameter>mode</parameter></term>
41 <listitem>
42 <para>
43 Specifies how polygons will be rasterized.
44 Accepted values are
45 <constant>GL_POINT</constant>,
46 <constant>GL_LINE</constant>, and
47 <constant>GL_FILL</constant>.
48 The initial value is <constant>GL_FILL</constant> for both front- and back-facing polygons.
49 </para>
50 </listitem>
51 </varlistentry>
52 </variablelist>
53 </refsect1>
54 <refsect1 id="description"><title>Description</title>
55 <para>
56 <function>glPolygonMode</function> controls the interpretation of polygons for rasterization.
57 <parameter>face</parameter> describes which polygons <parameter>mode</parameter> applies to:
58 both front and back-facing polygons (<constant>GL_FRONT_AND_BACK</constant>).
59 The polygon mode affects only the final rasterization of polygons.
60 In particular,
61 a polygon's vertices are lit and
62 the polygon is clipped and possibly culled before these modes are applied.
63 </para>
64 <para>
65 Three modes are defined and can be specified in <parameter>mode</parameter>:
66 </para>
67 <variablelist>
68 <varlistentry>
69 <term><constant>GL_POINT</constant></term>
70 <listitem>
71 <para>
72 Polygon vertices that are marked as the start of a boundary edge
73 are drawn as points.
74 Point attributes such as
75 <constant>GL_POINT_SIZE</constant> and
76 <constant>GL_POINT_SMOOTH</constant> control
77 the rasterization of the points.
78 Polygon rasterization attributes other than <constant>GL_POLYGON_MODE</constant> have no effect.
79 </para>
80 </listitem>
81 </varlistentry>
82 <varlistentry>
83 <term><constant>GL_LINE</constant></term>
84 <listitem>
85 <para>
86 Boundary edges of the polygon are drawn as line segments.
87 Line attributes such as
88 <constant>GL_LINE_WIDTH</constant> and
89 <constant>GL_LINE_SMOOTH</constant> control
90 the rasterization of the lines.
91 Polygon rasterization attributes other than <constant>GL_POLYGON_MODE</constant> have no effect.
92 </para>
93 </listitem>
94 </varlistentry>
95 <varlistentry>
96 <term><constant>GL_FILL</constant></term>
97 <listitem>
98 <para>
99 The interior of the polygon is filled.
100 Polygon attributes such as <constant>GL_POLYGON_SMOOTH</constant> control the rasterization of the polygon.
101 </para>
102 </listitem>
103 </varlistentry>
104 </variablelist>
105 </refsect1>
106 <refsect1 id="examples"><title>Examples</title>
107 <para>
108 To draw a surface with outlined polygons,
109 call
110 <programlisting>
111 glPolygonMode(<constant>GL_FRONT_AND_BACK</constant>, <constant>GL_LINE</constant>);
112 </programlisting>
113 </para>
114 </refsect1>
115 <refsect1 id="notes"><title>Notes</title>
116 <para>
117 Vertices are marked as boundary or nonboundary with an edge flag.
118 Edge flags are generated internally by the GL when it decomposes
119 triangle stips and fans.
120 </para>
121 </refsect1>
122 <refsect1 id="errors"><title>Errors</title>
123 <para>
124 <constant>GL_INVALID_ENUM</constant> is generated if either <parameter>face</parameter> or <parameter>mode</parameter> is not
125 an accepted value.
126 </para>
127 </refsect1>
128 <refsect1 id="associatedgets"><title>Associated Gets</title>
129 <para>
130 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_POLYGON_MODE</constant>
131 </para>
132 </refsect1>
133 <refsect1 id="seealso"><title>See Also</title>
134 <para>
135 <citerefentry><refentrytitle>glLineWidth</refentrytitle></citerefentry>,
136 <citerefentry><refentrytitle>glPointSize</refentrytitle></citerefentry>
137 </para>
138 </refsect1>
139 <refsect1 id="Copyright"><title>Copyright</title>
140 <para>
141 Copyright <trademark class="copyright"></trademark> 1991-2006
142 Silicon Graphics, Inc. This document is licensed under the SGI
143 Free Software B License. For details, see
144 <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
145 </para>
146 </refsect1>
147 </refentry>