rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man3 / glProvokingVertex.xml
CommitLineData
7faf1d71
AW
1<?xml version="1.0" encoding="UTF-8"?>\r
2<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"\r
3 "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">\r
4<refentry id="glProvokingVertex">\r
5 <refmeta>\r
6 <refmetainfo>\r
7 <copyright>\r
8 <year>2010</year>\r
9 <holder>Khronos Group</holder>\r
10 </copyright>\r
11 </refmetainfo>\r
12 <refentrytitle>glProvokingVertex</refentrytitle>\r
13 <manvolnum>3G</manvolnum>\r
14 </refmeta>\r
15 <refnamediv>\r
16 <refname>glProvokingVertex</refname>\r
17 <refpurpose>specifiy the vertex to be used as the source of data for flat shaded varyings</refpurpose>\r
18 </refnamediv>\r
19 <refsynopsisdiv><title>C Specification</title>\r
20 <funcsynopsis>\r
21 <funcprototype>\r
22 <funcdef>void <function>glProvokingVertex</function></funcdef>\r
23 <paramdef>GLenum <parameter>provokeMode</parameter></paramdef>\r
24 </funcprototype>\r
25 </funcsynopsis>\r
26 </refsynopsisdiv>\r
27 <!-- eqn: ignoring delim $$ -->\r
28 <refsect1 id="parameters"><title>Parameters</title>\r
29 <variablelist>\r
30 <varlistentry>\r
31 <term><parameter>provokeMode</parameter></term>\r
32 <listitem>\r
33 <para>\r
34 Specifies the vertex to be used as the source of data for flat shaded varyings.\r
35 </para>\r
36 </listitem>\r
37 </varlistentry>\r
38 </variablelist>\r
39 </refsect1>\r
40 <refsect1 id="description"><title>Description</title>\r
41 <para>\r
42 <emphasis>Flatshading</emphasis> a vertex shader varying output means to assign all vetices of the primitive the same value\r
43 for that output. The vertex from which these values is derived is known as the <emphasis>provoking vertex</emphasis> and\r
44 <function>glProvokingVertex</function> specifies which vertex is to be used as the source of data for flat shaded varyings.\r
45 </para>\r
46 <para>\r
47 <parameter>provokeMode</parameter> must be either <constant>GL_FIRST_VERTEX_CONVENTION</constant> or\r
48 <constant>GL_LAST_VERTEX_CONVENTION</constant>, and controls the selection of the vertex whose values are assigned to flatshaded\r
49 varying outputs. The interpretation of these values for the supported primitive types is:\r
50 <informaltable frame="topbot">\r
51 <tgroup cols="3" align="left">\r
52 <colspec colwidth="1.1*" />\r
53 <colspec colwidth="1*" />\r
54 <colspec colwidth="1*" />\r
55 <thead>\r
56 <row>\r
57 <entry rowsep="1" align="left"><emphasis role="bold">\r
58 Primitive Type of Polygon <emphasis>i</emphasis>\r
59 </emphasis></entry>\r
60 <entry rowsep="1" align="left"><emphasis role="bold">\r
61 First Vertex Convention\r
62 </emphasis></entry>\r
63 <entry rowsep="1" align="left"><emphasis role="bold">\r
64 Last Vertex Convention\r
65 </emphasis></entry>\r
66 </row>\r
67 <row>\r
68 <entry>\r
69 point\r
70 </entry>\r
71 <entry>\r
72 <emphasis>i</emphasis>\r
73 </entry>\r
74 <entry>\r
75 <emphasis>i</emphasis>\r
76 </entry>\r
77 </row>\r
78 <row>\r
79 <entry>\r
80 independent line\r
81 </entry>\r
82 <entry>\r
83 2<emphasis>i</emphasis> - 1\r
84 </entry>\r
85 <entry>\r
86 2<emphasis>i</emphasis>\r
87 </entry>\r
88 </row>\r
89 <row>\r
90 <entry>\r
91 line loop\r
92 </entry>\r
93 <entry>\r
94 <emphasis>i</emphasis>\r
95 </entry>\r
96 <entry>\r
97 <para>\r
98 <emphasis>i</emphasis> + 1, if <emphasis>i</emphasis> &lt; <emphasis>n</emphasis>\r
99 </para>\r
100 <para>\r
101 1, if <emphasis>i</emphasis> = <emphasis>n</emphasis>\r
102 </para>\r
103 </entry>\r
104 </row>\r
105 <row>\r
106 <entry>\r
107 line strip\r
108 </entry>\r
109 <entry>\r
110 <emphasis>i</emphasis>\r
111 </entry>\r
112 <entry>\r
113 <emphasis>i</emphasis> + 1\r
114 </entry>\r
115 </row>\r
116 <row>\r
117 <entry>\r
118 independent triangle\r
119 </entry>\r
120 <entry>\r
121 3<emphasis>i</emphasis> - 2\r
122 </entry>\r
123 <entry>\r
124 3<emphasis>i</emphasis>\r
125 </entry>\r
126 </row>\r
127 <row>\r
128 <entry>\r
129 triangle strip\r
130 </entry>\r
131 <entry>\r
132 <emphasis>i</emphasis>\r
133 </entry>\r
134 <entry>\r
135 <emphasis>i</emphasis> + 2\r
136 </entry>\r
137 </row>\r
138 <row>\r
139 <entry>\r
140 triangle fan\r
141 </entry>\r
142 <entry>\r
143 <emphasis>i</emphasis> + 1\r
144 </entry>\r
145 <entry>\r
146 <emphasis>i</emphasis> + 2\r
147 </entry>\r
148 </row>\r
149 <row>\r
150 <entry>\r
151 line adjacency\r
152 </entry>\r
153 <entry>\r
154 4<emphasis>i</emphasis> - 2\r
155 </entry>\r
156 <entry>\r
157 4<emphasis>i</emphasis> - 1\r
158 </entry>\r
159 </row>\r
160 <row>\r
161 <entry>\r
162 line strip adjacency\r
163 </entry>\r
164 <entry>\r
165 <emphasis>i</emphasis> + 1\r
166 </entry>\r
167 <entry>\r
168 <emphasis>i</emphasis> + 2\r
169 </entry>\r
170 </row>\r
171 <row>\r
172 <entry>\r
173 triangle adjacency\r
174 </entry>\r
175 <entry>\r
176 6<emphasis>i</emphasis> - 5\r
177 </entry>\r
178 <entry>\r
179 6<emphasis>i</emphasis> - 1\r
180 </entry>\r
181 </row>\r
182 <row>\r
183 <entry>\r
184 triangle strip adjacency\r
185 </entry>\r
186 <entry>\r
187 2<emphasis>i</emphasis> - 1\r
188 </entry>\r
189 <entry>\r
190 2<emphasis>i</emphasis> + 3\r
191 </entry>\r
192 </row>\r
193 </thead>\r
194 </tgroup>\r
195 </informaltable>\r
196 </para>\r
197 <para>\r
198 If a vertex or geometry shader is active, user-defined varying outputs may be flatshaded by using the\r
199 <code>flat</code> qualifier when declaring the output.\r
200 </para>\r
201 </refsect1>\r
202 <refsect1 id="notes"><title>Notes</title>\r
203 <para>\r
204 <function>glProvokingVertex</function> is available only if the GL version is 3.2 or greater.\r
205 </para>\r
206 </refsect1>\r
207 <refsect1 id="errors"><title>Errors</title>\r
208 <para>\r
209 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>provokeMode</parameter> is not an accepted value.\r
210 </para>\r
211 </refsect1>\r
212 <refsect1 id="Copyright"><title>Copyright</title>\r
213 <para>\r
214 Copyright <trademark class="copyright"></trademark> 2010 Khronos Group. \r
215 This material may be distributed subject to the terms and conditions set forth in \r
216 the Open Publication License, v 1.0, 8 June 1999.\r
217 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.\r
218 </para>\r
219 </refsect1>\r
220</refentry>\r