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_InvocationID">
9 <holder>Khronos Group
</holder>
12 <refentrytitle>gl_InvocationID
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>gl_InvocationID
</refname>
17 <refpurpose>contains the invocation index of the current shader
</refpurpose>
19 <refsynopsisdiv><title>Declaration
</title>
21 <function>in int gl_InvocationID;
</function>
24 <refsect1 id=
"description"><title>Description
</title>
26 In the tessellation control language,
<function>gl_InvocationID
</function>
27 contains the index of the output patch vertex assigned to the shader invocation.
28 It is assigned an integer value in the range [
0, N-
1] where N is the number of output
32 In the geometry language,
<function>gl_InvocationID
</function> identifies
33 the invocation number assigned to the geometry shader invocation. It is assigned
34 an integer value in the range [
0, N-
1] where N is the number of geometry shader
35 invocations per primitive.
38 <refsect1 id=
"versions"><title>Version Support
</title>
39 <informaltable frame=
"topbot">
40 <tgroup cols=
"3" align=
"left">
41 <colspec colwidth=
"1.1*" />
42 <colspec colwidth=
"1*" align=
"center" />
43 <colspec colwidth=
"1*" align=
"center" />
44 <colspec colwidth=
"1*" align=
"center" />
45 <colspec colwidth=
"1*" align=
"center" />
46 <colspec colwidth=
"1*" align=
"center" />
47 <colspec colwidth=
"1*" align=
"center" />
48 <colspec colwidth=
"1*" align=
"center" />
49 <colspec colwidth=
"1*" align=
"center" />
52 <entry rowsep=
"1" align=
"left"><emphasis role=
"bold">
55 <entry rowsep=
"1" align=
"left"><emphasis role=
"bold">
58 <entry rowsep=
"1" align=
"left"><emphasis role=
"bold">
61 <entry rowsep=
"1" align=
"left"><emphasis role=
"bold">
64 <entry rowsep=
"1" align=
"left"><emphasis role=
"bold">
67 <entry rowsep=
"1" align=
"left"><emphasis role=
"bold">
70 <entry rowsep=
"1" align=
"left"><emphasis role=
"bold">
73 <entry rowsep=
"1" align=
"left"><emphasis role=
"bold">
76 <entry rowsep=
"1" align=
"left"><emphasis role=
"bold">
85 <emphasis>-
</emphasis> <!-- 1.10, OpenGL 2.0 -->
88 <emphasis>-
</emphasis> <!-- 1.20, OpenGL 2.1 -->
91 <emphasis>-
</emphasis> <!-- 1.30, OpenGL 3.0 -->
94 <emphasis>-
</emphasis> <!-- 1.40, OpenGL 3.1 -->
97 <emphasis>Y
</emphasis><superscript>1</superscript> <!-- 1.50, OpenGL 3.2 -->
100 <emphasis>Y
</emphasis><superscript>1</superscript> <!-- 3.30, OpenGL 3.3 -->
103 <emphasis>Y
</emphasis> <!-- 4.00, OpenGL 4.0 -->
106 <emphasis>Y
</emphasis> <!-- 4.10, OpenGL 4.1 -->
112 <para>[
1] Versions
1.50 to
3.30 - geometry shaders only.
</para>
114 <refsect1 id=
"seealso"><title>See Also
</title>
116 <citerefentry><refentrytitle>gl_InstanceID
</refentrytitle></citerefentry>
119 <refsect1 id=
"Copyright"><title>Copyright
</title>
121 Copyright
<trademark class=
"copyright"></trademark> 2011 Khronos Group.
122 This material may be distributed subject to the terms and conditions set forth in
123 the Open Publication License, v
1.0,
8 June
1999.
124 <ulink url=
"http://opencontent.org/openpub/">http://opencontent.org/openpub/
</ulink>.