2014-03-28 19:06:55 +00:00
|
|
|
<!DOCTYPE refentry [ <!ENTITY % mathent SYSTEM "math.ent"> %mathent; ]>
|
|
|
|
|
|
|
|
<!-- Converted by db4-upgrade version 1.1 -->
|
|
|
|
|
|
|
|
<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="glPolygonMode">
|
|
|
|
<info>
|
2013-11-03 11:43:50 +00:00
|
|
|
<copyright>
|
|
|
|
<year>1991-2006</year>
|
|
|
|
<holder>Silicon Graphics, Inc.</holder>
|
|
|
|
</copyright>
|
2013-12-15 21:32:32 +00:00
|
|
|
<copyright>
|
|
|
|
<year>2010-2013</year>
|
|
|
|
<holder>Khronos Group</holder>
|
|
|
|
</copyright>
|
2014-03-28 19:06:55 +00:00
|
|
|
</info>
|
2009-03-08 00:46:58 +00:00
|
|
|
<refmeta>
|
|
|
|
<refentrytitle>glPolygonMode</refentrytitle>
|
|
|
|
<manvolnum>3G</manvolnum>
|
|
|
|
</refmeta>
|
|
|
|
<refnamediv>
|
|
|
|
<refname>glPolygonMode</refname>
|
|
|
|
<refpurpose>select a polygon rasterization mode</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
<refsynopsisdiv><title>C Specification</title>
|
|
|
|
<funcsynopsis>
|
|
|
|
<funcprototype>
|
|
|
|
<funcdef>void <function>glPolygonMode</function></funcdef>
|
|
|
|
<paramdef>GLenum <parameter>face</parameter></paramdef>
|
|
|
|
<paramdef>GLenum <parameter>mode</parameter></paramdef>
|
|
|
|
</funcprototype>
|
|
|
|
</funcsynopsis>
|
|
|
|
</refsynopsisdiv>
|
2014-03-28 19:06:55 +00:00
|
|
|
<refsect1 xml:id="parameters"><title>Parameters</title>
|
2009-03-08 00:46:58 +00:00
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>face</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Specifies the polygons that <parameter>mode</parameter> applies to.
|
2010-11-21 14:34:29 +00:00
|
|
|
Must be <constant>GL_FRONT_AND_BACK</constant> for front- and back-facing polygons.
|
2009-03-08 00:46:58 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>mode</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Specifies how polygons will be rasterized.
|
|
|
|
Accepted values are
|
|
|
|
<constant>GL_POINT</constant>,
|
|
|
|
<constant>GL_LINE</constant>, and
|
|
|
|
<constant>GL_FILL</constant>.
|
|
|
|
The initial value is <constant>GL_FILL</constant> for both front- and back-facing polygons.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</refsect1>
|
2014-03-28 19:06:55 +00:00
|
|
|
<refsect1 xml:id="description"><title>Description</title>
|
2009-03-08 00:46:58 +00:00
|
|
|
<para>
|
|
|
|
<function>glPolygonMode</function> controls the interpretation of polygons for rasterization.
|
|
|
|
<parameter>face</parameter> describes which polygons <parameter>mode</parameter> applies to:
|
2010-11-21 14:34:29 +00:00
|
|
|
both front and back-facing polygons (<constant>GL_FRONT_AND_BACK</constant>).
|
2009-03-08 00:46:58 +00:00
|
|
|
The polygon mode affects only the final rasterization of polygons.
|
|
|
|
In particular,
|
|
|
|
a polygon's vertices are lit and
|
|
|
|
the polygon is clipped and possibly culled before these modes are applied.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
Three modes are defined and can be specified in <parameter>mode</parameter>:
|
|
|
|
</para>
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><constant>GL_POINT</constant></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Polygon vertices that are marked as the start of a boundary edge
|
|
|
|
are drawn as points.
|
|
|
|
Point attributes such as
|
|
|
|
<constant>GL_POINT_SIZE</constant> and
|
|
|
|
<constant>GL_POINT_SMOOTH</constant> control
|
|
|
|
the rasterization of the points.
|
|
|
|
Polygon rasterization attributes other than <constant>GL_POLYGON_MODE</constant> have no effect.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><constant>GL_LINE</constant></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Boundary edges of the polygon are drawn as line segments.
|
|
|
|
Line attributes such as
|
|
|
|
<constant>GL_LINE_WIDTH</constant> and
|
|
|
|
<constant>GL_LINE_SMOOTH</constant> control
|
|
|
|
the rasterization of the lines.
|
|
|
|
Polygon rasterization attributes other than <constant>GL_POLYGON_MODE</constant> have no effect.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><constant>GL_FILL</constant></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The interior of the polygon is filled.
|
2010-11-21 14:34:29 +00:00
|
|
|
Polygon attributes such as <constant>GL_POLYGON_SMOOTH</constant> control the rasterization of the polygon.
|
2009-03-08 00:46:58 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</refsect1>
|
2014-03-28 19:06:55 +00:00
|
|
|
<refsect1 xml:id="examples"><title>Examples</title>
|
2009-03-08 00:46:58 +00:00
|
|
|
<para>
|
2010-11-21 14:34:29 +00:00
|
|
|
To draw a surface with outlined polygons,
|
2009-03-08 00:46:58 +00:00
|
|
|
call
|
|
|
|
<programlisting>
|
2010-11-21 14:34:29 +00:00
|
|
|
glPolygonMode(<constant>GL_FRONT_AND_BACK</constant>, <constant>GL_LINE</constant>);
|
2009-03-08 00:46:58 +00:00
|
|
|
</programlisting>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
2014-03-28 19:06:55 +00:00
|
|
|
<refsect1 xml:id="notes"><title>Notes</title>
|
2009-03-08 00:46:58 +00:00
|
|
|
<para>
|
|
|
|
Vertices are marked as boundary or nonboundary with an edge flag.
|
|
|
|
Edge flags are generated internally by the GL when it decomposes
|
2010-11-21 14:34:29 +00:00
|
|
|
triangle stips and fans.
|
2009-03-08 00:46:58 +00:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
2014-03-28 19:06:55 +00:00
|
|
|
<refsect1 xml:id="errors"><title>Errors</title>
|
2009-03-08 00:46:58 +00:00
|
|
|
<para>
|
|
|
|
<constant>GL_INVALID_ENUM</constant> is generated if either <parameter>face</parameter> or <parameter>mode</parameter> is not
|
|
|
|
an accepted value.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
2014-03-28 19:06:55 +00:00
|
|
|
<refsect1 xml:id="associatedgets"><title>Associated Gets</title>
|
2009-03-08 00:46:58 +00:00
|
|
|
<para>
|
|
|
|
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_POLYGON_MODE</constant>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
2014-03-28 19:06:55 +00:00
|
|
|
<refsect1 xml:id="seealso"><title>See Also</title>
|
2009-03-08 00:46:58 +00:00
|
|
|
<para>
|
|
|
|
<citerefentry><refentrytitle>glLineWidth</refentrytitle></citerefentry>,
|
2010-11-21 14:34:29 +00:00
|
|
|
<citerefentry><refentrytitle>glPointSize</refentrytitle></citerefentry>
|
2009-03-08 00:46:58 +00:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
2014-03-28 19:06:55 +00:00
|
|
|
<refsect1 xml:id="Copyright"><title>Copyright</title>
|
2009-03-08 00:46:58 +00:00
|
|
|
<para>
|
2014-03-28 19:06:55 +00:00
|
|
|
Copyright <trademark class="copyright"/> 1991-2006 Silicon Graphics, Inc.
|
|
|
|
Copyright <trademark class="copyright"/> 2010-2013 Khronos Group.
|
2013-12-15 21:32:32 +00:00
|
|
|
This document is licensed under the SGI Free Software B License.
|
|
|
|
For details, see
|
2014-03-28 19:06:55 +00:00
|
|
|
<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</link>.
|
2009-03-08 00:46:58 +00:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|