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=
"gl_InstanceID">
9 <holder>Khronos Group
</holder>
12 <refentrytitle>gl_InstanceID
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>gl_InstanceID
</refname>
17 <refpurpose>contains the index of the current primitive in an instanced draw command
</refpurpose>
19 <refsynopsisdiv><title>Declaration
</title>
21 <function>in int gl_InstanceID;
</function>
24 <refsect1 id=
"description"><title>Description
</title>
26 <function>gl_InstanceID
</function> is a vertex language input variable that
27 holds the integer index of the current primitive in an instanced draw
28 command such as
<function>glDrawArraysInstanced
</function>. If the current
29 primitive does not originate from an instanced draw command, the value
30 of
<function>gl_InstanceID
</function> is zero.
33 <refsect1 id=
"versions"><title>Version Support
</title>
34 <informaltable frame=
"topbot">
35 <tgroup cols=
"3" align=
"left">
36 <colspec colwidth=
"1.1*" />
37 <colspec colwidth=
"1*" align=
"center" />
38 <colspec colwidth=
"1*" align=
"center" />
39 <colspec colwidth=
"1*" align=
"center" />
40 <colspec colwidth=
"1*" align=
"center" />
41 <colspec colwidth=
"1*" align=
"center" />
42 <colspec colwidth=
"1*" align=
"center" />
43 <colspec colwidth=
"1*" align=
"center" />
44 <colspec colwidth=
"1*" align=
"center" />
47 <entry rowsep=
"1" align=
"left"><emphasis role=
"bold">
50 <entry rowsep=
"1" align=
"left"><emphasis role=
"bold">
53 <entry rowsep=
"1" align=
"left"><emphasis role=
"bold">
56 <entry rowsep=
"1" align=
"left"><emphasis role=
"bold">
59 <entry rowsep=
"1" align=
"left"><emphasis role=
"bold">
62 <entry rowsep=
"1" align=
"left"><emphasis role=
"bold">
65 <entry rowsep=
"1" align=
"left"><emphasis role=
"bold">
68 <entry rowsep=
"1" align=
"left"><emphasis role=
"bold">
71 <entry rowsep=
"1" align=
"left"><emphasis role=
"bold">
80 <emphasis>-
</emphasis> <!-- 1.10, OpenGL 2.0 -->
83 <emphasis>-
</emphasis> <!-- 1.20, OpenGL 2.1 -->
86 <emphasis>-
</emphasis> <!-- 1.30, OpenGL 3.0 -->
89 <emphasis>Y
</emphasis> <!-- 1.40, OpenGL 3.1 -->
92 <emphasis>Y
</emphasis> <!-- 1.50, OpenGL 3.2 -->
95 <emphasis>Y
</emphasis> <!-- 3.30, OpenGL 3.3 -->
98 <emphasis>Y
</emphasis> <!-- 4.00, OpenGL 4.0 -->
101 <emphasis>Y
</emphasis> <!-- 4.10, OpenGL 4.1 -->
108 <refsect1 id=
"seealso"><title>See Also
</title>
110 <citerefentry><refentrytitle>gl_VertexID
</refentrytitle></citerefentry>
113 <refsect1 id=
"Copyright"><title>Copyright
</title>
115 Copyright
<trademark class=
"copyright"></trademark> 2011 Khronos Group.
116 This material may be distributed subject to the terms and conditions set forth in
117 the Open Publication License, v
1.0,
8 June
1999.
118 <ulink url=
"http://opencontent.org/openpub/">http://opencontent.org/openpub/
</ulink>.