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="glFrontFace"> | |
5 | <refmeta> | |
6 | <refmetainfo> | |
7 | <copyright> | |
8 | <year>1991-2006</year> | |
9 | <holder>Silicon Graphics, Inc.</holder> | |
10 | </copyright> | |
11 | </refmetainfo> | |
12 | <refentrytitle>glFrontFace</refentrytitle> | |
13 | <manvolnum>3G</manvolnum> | |
14 | </refmeta> | |
15 | <refnamediv> | |
16 | <refname>glFrontFace</refname> | |
17 | <refpurpose>define front- and back-facing polygons</refpurpose> | |
18 | </refnamediv> | |
19 | <refsynopsisdiv><title>C Specification</title> | |
20 | <funcsynopsis> | |
21 | <funcprototype> | |
22 | <funcdef>void <function>glFrontFace</function></funcdef> | |
23 | <paramdef>GLenum <parameter>mode</parameter></paramdef> | |
24 | </funcprototype> | |
25 | </funcsynopsis> | |
26 | </refsynopsisdiv> | |
27 | <!-- eqn: ignoring delim $$ --> | |
28 | <refsect1 id="parameters"><title>Parameters</title> | |
29 | <variablelist> | |
30 | <varlistentry> | |
31 | <term><parameter>mode</parameter></term> | |
32 | <listitem> | |
33 | <para> | |
34 | Specifies the orientation of front-facing polygons. | |
35 | <constant>GL_CW</constant> and <constant>GL_CCW</constant> are accepted. | |
36 | The initial value is <constant>GL_CCW</constant>. | |
37 | </para> | |
38 | </listitem> | |
39 | </varlistentry> | |
40 | </variablelist> | |
41 | </refsect1> | |
42 | <refsect1 id="description"><title>Description</title> | |
43 | <para> | |
44 | In a scene composed entirely of opaque closed surfaces, | |
45 | back-facing polygons are never visible. | |
46 | Eliminating these invisible polygons has the obvious benefit | |
47 | of speeding up the rendering of the image. | |
48 | To enable and disable elimination of back-facing polygons, call <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> | |
49 | and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> with argument <constant>GL_CULL_FACE</constant>. | |
50 | </para> | |
51 | <para> | |
52 | The projection of a polygon to window coordinates is said to have | |
53 | clockwise winding if an imaginary object following the path | |
54 | from its first vertex, | |
55 | its second vertex, | |
56 | and so on, | |
57 | to its last vertex, | |
58 | and finally back to its first vertex, | |
59 | moves in a clockwise direction about the interior of the polygon. | |
60 | The polygon's winding is said to be counterclockwise if the imaginary | |
61 | object following the same path moves in a counterclockwise direction | |
62 | about the interior of the polygon. | |
63 | <function>glFrontFace</function> specifies whether polygons with clockwise winding in window coordinates, | |
64 | or counterclockwise winding in window coordinates, | |
65 | are taken to be front-facing. | |
66 | Passing <constant>GL_CCW</constant> to <parameter>mode</parameter> selects counterclockwise polygons as | |
67 | front-facing; | |
68 | <constant>GL_CW</constant> selects clockwise polygons as front-facing. | |
69 | By default, counterclockwise polygons are taken to be front-facing. | |
70 | </para> | |
71 | </refsect1> | |
72 | <refsect1 id="errors"><title>Errors</title> | |
73 | <para> | |
74 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>mode</parameter> is not an accepted value. | |
75 | </para> | |
76 | </refsect1> | |
77 | <refsect1 id="associatedgets"><title>Associated Gets</title> | |
78 | <para> | |
79 | <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_FRONT_FACE</constant> | |
80 | </para> | |
81 | </refsect1> | |
82 | <refsect1 id="seealso"><title>See Also</title> | |
83 | <para> | |
84 | <citerefentry><refentrytitle>glCullFace</refentrytitle></citerefentry>, | |
85 | </para> | |
86 | </refsect1> | |
87 | <refsect1 id="Copyright"><title>Copyright</title> | |
88 | <para> | |
89 | Copyright <trademark class="copyright"></trademark> 1991-2006 | |
90 | Silicon Graphics, Inc. This document is licensed under the SGI | |
91 | Free Software B License. For details, see | |
92 | <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>. | |
93 | </para> | |
94 | </refsect1> | |
95 | </refentry> |