1d8427c38152c23b17163a2056e0a5dc01016f3b
[clinton/guile-figl.git] / upstream-man-pages / man4 / glPrimitiveRestartIndex.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="glPrimitiveRestartIndex">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2010</year>
9 <holder>Khronos Group</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glPrimitiveRestartIndex</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glPrimitiveRestartIndex</refname>
17 <refpurpose>specify the primitive restart index</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glPrimitiveRestartIndex</function></funcdef>
23 <paramdef>GLuint <parameter>index</parameter></paramdef>
24 </funcprototype>
25 </funcsynopsis>
26 </refsynopsisdiv>
27 <refsect1 id="parameters"><title>Parameters</title>
28 <variablelist>
29 <varlistentry>
30 <term><parameter>index</parameter></term>
31 <listitem>
32 <para>
33 Specifies the value to be interpreted as the primitive restart index.
34 </para>
35 </listitem>
36 </varlistentry>
37 </variablelist>
38 </refsect1>
39 <refsect1 id="description"><title>Description</title>
40 <para>
41 <function>glPrimitiveRestartIndex</function> specifies a vertex array element that is treated specially when
42 primitive restarting is enabled. This is known as the primitive restart index.
43 </para>
44 <para>
45 When one of the <function>Draw*</function> commands transfers a set of generic attribute array elements to
46 the GL, if the index within the vertex arrays corresponding to that set is equal to the primitive restart
47 index, then the GL does not process those elements as a vertex. Instead, it is as if the drawing command
48 ended with the immediately preceding transfer, and another drawing command is immediately started with
49 the same parameters, but only transferring the immediately following element through the end of the
50 originally specified elements.
51 </para>
52 <para>
53 When either <citerefentry><refentrytitle>glDrawElementsBaseVertex</refentrytitle></citerefentry>,
54 <citerefentry><refentrytitle>glDrawElementsInstancedBaseVertex</refentrytitle></citerefentry> or
55 <citerefentry><refentrytitle>glMultiDrawElementsBaseVertex</refentrytitle></citerefentry> is used, the primitive restart
56 comparison occurs before the basevertex offset is added to the array index.
57 </para>
58 </refsect1>
59 <refsect1 id="notes"><title>Notes</title>
60 <para>
61 <function>glPrimitiveRestartIndex</function> is available only if the GL version is 3.1 or greater.
62 </para>
63 </refsect1>
64 <refsect1 id="seealso"><title>See Also</title>
65 <para>
66 <citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>,
67 <citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>,
68 <citerefentry><refentrytitle>glDrawElementsBaseVertex</refentrytitle></citerefentry>,
69 <citerefentry><refentrytitle>glDrawElementsInstancedBaseVertex</refentrytitle></citerefentry>
70 </para>
71 </refsect1>
72 <refsect1 id="Copyright"><title>Copyright</title>
73 <para>
74 Copyright <trademark class="copyright"></trademark> 2010 Khronos Group.
75 This material may be distributed subject to the terms and conditions set forth in
76 the Open Publication License, v 1.0, 8 June 1999.
77 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
78 </para>
79 </refsect1>
80 </refentry>