+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"\r
- "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">\r
-<refentry id="glProvokingVertex">\r
- <refmeta>\r
- <refmetainfo>\r
- <copyright>\r
- <year>2010</year>\r
- <holder>Khronos Group</holder>\r
- </copyright>\r
- </refmetainfo>\r
- <refentrytitle>glProvokingVertex</refentrytitle>\r
- <manvolnum>3G</manvolnum>\r
- </refmeta>\r
- <refnamediv>\r
- <refname>glProvokingVertex</refname>\r
- <refpurpose>specifiy the vertex to be used as the source of data for flat shaded varyings</refpurpose>\r
- </refnamediv>\r
- <refsynopsisdiv><title>C Specification</title>\r
- <funcsynopsis>\r
- <funcprototype>\r
- <funcdef>void <function>glProvokingVertex</function></funcdef>\r
- <paramdef>GLenum <parameter>provokeMode</parameter></paramdef>\r
- </funcprototype>\r
- </funcsynopsis>\r
- </refsynopsisdiv>\r
- <!-- eqn: ignoring delim $$ -->\r
- <refsect1 id="parameters"><title>Parameters</title>\r
- <variablelist>\r
- <varlistentry>\r
- <term><parameter>provokeMode</parameter></term>\r
- <listitem>\r
- <para>\r
- Specifies the vertex to be used as the source of data for flat shaded varyings.\r
- </para>\r
- </listitem>\r
- </varlistentry>\r
- </variablelist>\r
- </refsect1>\r
- <refsect1 id="description"><title>Description</title>\r
- <para>\r
- <emphasis>Flatshading</emphasis> a vertex shader varying output means to assign all vetices of the primitive the same value\r
- for that output. The vertex from which these values is derived is known as the <emphasis>provoking vertex</emphasis> and\r
- <function>glProvokingVertex</function> specifies which vertex is to be used as the source of data for flat shaded varyings.\r
- </para>\r
- <para>\r
- <parameter>provokeMode</parameter> must be either <constant>GL_FIRST_VERTEX_CONVENTION</constant> or\r
- <constant>GL_LAST_VERTEX_CONVENTION</constant>, and controls the selection of the vertex whose values are assigned to flatshaded\r
- varying outputs. The interpretation of these values for the supported primitive types is:\r
- <informaltable frame="topbot">\r
- <tgroup cols="3" align="left">\r
- <colspec colwidth="1.1*" />\r
- <colspec colwidth="1*" />\r
- <colspec colwidth="1*" />\r
- <thead>\r
- <row>\r
- <entry rowsep="1" align="left"><emphasis role="bold">\r
- Primitive Type of Polygon <emphasis>i</emphasis>\r
- </emphasis></entry>\r
- <entry rowsep="1" align="left"><emphasis role="bold">\r
- First Vertex Convention\r
- </emphasis></entry>\r
- <entry rowsep="1" align="left"><emphasis role="bold">\r
- Last Vertex Convention\r
- </emphasis></entry>\r
- </row>\r
- <row>\r
- <entry>\r
- point\r
- </entry>\r
- <entry>\r
- <emphasis>i</emphasis>\r
- </entry>\r
- <entry>\r
- <emphasis>i</emphasis>\r
- </entry>\r
- </row>\r
- <row>\r
- <entry>\r
- independent line\r
- </entry>\r
- <entry>\r
- 2<emphasis>i</emphasis> - 1\r
- </entry>\r
- <entry>\r
- 2<emphasis>i</emphasis>\r
- </entry>\r
- </row>\r
- <row>\r
- <entry>\r
- line loop\r
- </entry>\r
- <entry>\r
- <emphasis>i</emphasis>\r
- </entry>\r
- <entry>\r
- <para>\r
- <emphasis>i</emphasis> + 1, if <emphasis>i</emphasis> < <emphasis>n</emphasis>\r
- </para>\r
- <para>\r
- 1, if <emphasis>i</emphasis> = <emphasis>n</emphasis>\r
- </para>\r
- </entry>\r
- </row>\r
- <row>\r
- <entry>\r
- line strip\r
- </entry>\r
- <entry>\r
- <emphasis>i</emphasis>\r
- </entry>\r
- <entry>\r
- <emphasis>i</emphasis> + 1\r
- </entry>\r
- </row>\r
- <row>\r
- <entry>\r
- independent triangle\r
- </entry>\r
- <entry>\r
- 3<emphasis>i</emphasis> - 2\r
- </entry>\r
- <entry>\r
- 3<emphasis>i</emphasis>\r
- </entry>\r
- </row>\r
- <row>\r
- <entry>\r
- triangle strip\r
- </entry>\r
- <entry>\r
- <emphasis>i</emphasis>\r
- </entry>\r
- <entry>\r
- <emphasis>i</emphasis> + 2\r
- </entry>\r
- </row>\r
- <row>\r
- <entry>\r
- triangle fan\r
- </entry>\r
- <entry>\r
- <emphasis>i</emphasis> + 1\r
- </entry>\r
- <entry>\r
- <emphasis>i</emphasis> + 2\r
- </entry>\r
- </row>\r
- <row>\r
- <entry>\r
- line adjacency\r
- </entry>\r
- <entry>\r
- 4<emphasis>i</emphasis> - 2\r
- </entry>\r
- <entry>\r
- 4<emphasis>i</emphasis> - 1\r
- </entry>\r
- </row>\r
- <row>\r
- <entry>\r
- line strip adjacency\r
- </entry>\r
- <entry>\r
- <emphasis>i</emphasis> + 1\r
- </entry>\r
- <entry>\r
- <emphasis>i</emphasis> + 2\r
- </entry>\r
- </row>\r
- <row>\r
- <entry>\r
- triangle adjacency\r
- </entry>\r
- <entry>\r
- 6<emphasis>i</emphasis> - 5\r
- </entry>\r
- <entry>\r
- 6<emphasis>i</emphasis> - 1\r
- </entry>\r
- </row>\r
- <row>\r
- <entry>\r
- triangle strip adjacency\r
- </entry>\r
- <entry>\r
- 2<emphasis>i</emphasis> - 1\r
- </entry>\r
- <entry>\r
- 2<emphasis>i</emphasis> + 3\r
- </entry>\r
- </row>\r
- </thead>\r
- </tgroup>\r
- </informaltable>\r
- </para>\r
- <para>\r
- If a vertex or geometry shader is active, user-defined varying outputs may be flatshaded by using the\r
- <code>flat</code> qualifier when declaring the output.\r
- </para>\r
- </refsect1>\r
- <refsect1 id="notes"><title>Notes</title>\r
- <para>\r
- <function>glProvokingVertex</function> is available only if the GL version is 3.2 or greater.\r
- </para>\r
- </refsect1>\r
- <refsect1 id="errors"><title>Errors</title>\r
- <para>\r
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>provokeMode</parameter> is not an accepted value.\r
- </para>\r
- </refsect1>\r
- <refsect1 id="Copyright"><title>Copyright</title>\r
- <para>\r
- Copyright <trademark class="copyright"></trademark> 2010 Khronos Group. \r
- This material may be distributed subject to the terms and conditions set forth in \r
- the Open Publication License, v 1.0, 8 June 1999.\r
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.\r
- </para>\r
- </refsect1>\r
-</refentry>\r