5a89241f88ddd75a751d668e2acd701185a3ba46
[clinton/guile-figl.git] / upstream-man-pages / manglsl / gl_InvocationID.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="gl_InvocationID">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2011</year>
9 <holder>Khronos Group</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>gl_InvocationID</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>gl_InvocationID</refname>
17 <refpurpose>contains the invocation index of the current shader</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>Declaration</title>
20 <funcsynopsis>
21 <function>in int gl_InvocationID;</function>
22 </funcsynopsis>
23 </refsynopsisdiv>
24 <refsect1 id="description"><title>Description</title>
25 <para>
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
29 patch vertices.
30 </para>
31 <para>
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.
36 </para>
37 </refsect1>
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" />
50 <thead>
51 <row>
52 <entry rowsep="1" align="left"><emphasis role="bold">
53 Variable
54 </emphasis></entry>
55 <entry rowsep="1" align="left"><emphasis role="bold">
56 Version 1.10
57 </emphasis></entry>
58 <entry rowsep="1" align="left"><emphasis role="bold">
59 Version 1.20
60 </emphasis></entry>
61 <entry rowsep="1" align="left"><emphasis role="bold">
62 Version 1.30
63 </emphasis></entry>
64 <entry rowsep="1" align="left"><emphasis role="bold">
65 Version 1.40
66 </emphasis></entry>
67 <entry rowsep="1" align="left"><emphasis role="bold">
68 Version 1.50
69 </emphasis></entry>
70 <entry rowsep="1" align="left"><emphasis role="bold">
71 Version 3.30
72 </emphasis></entry>
73 <entry rowsep="1" align="left"><emphasis role="bold">
74 Version 4.00
75 </emphasis></entry>
76 <entry rowsep="1" align="left"><emphasis role="bold">
77 Version 4.10
78 </emphasis></entry>
79 </row>
80 <row>
81 <entry>
82 gl_InvocationID
83 </entry>
84 <entry>
85 <emphasis>-</emphasis> <!-- 1.10, OpenGL 2.0 -->
86 </entry>
87 <entry>
88 <emphasis>-</emphasis> <!-- 1.20, OpenGL 2.1 -->
89 </entry>
90 <entry>
91 <emphasis>-</emphasis> <!-- 1.30, OpenGL 3.0 -->
92 </entry>
93 <entry>
94 <emphasis>-</emphasis> <!-- 1.40, OpenGL 3.1 -->
95 </entry>
96 <entry>
97 <emphasis>Y</emphasis><superscript>1</superscript> <!-- 1.50, OpenGL 3.2 -->
98 </entry>
99 <entry>
100 <emphasis>Y</emphasis><superscript>1</superscript> <!-- 3.30, OpenGL 3.3 -->
101 </entry>
102 <entry>
103 <emphasis>Y</emphasis> <!-- 4.00, OpenGL 4.0 -->
104 </entry>
105 <entry>
106 <emphasis>Y</emphasis> <!-- 4.10, OpenGL 4.1 -->
107 </entry>
108 </row>
109 </thead>
110 </tgroup>
111 </informaltable>
112 <para>[1] Versions 1.50 to 3.30 - geometry shaders only.</para>
113 </refsect1>
114 <refsect1 id="seealso"><title>See Also</title>
115 <para>
116 <citerefentry><refentrytitle>gl_InstanceID</refentrytitle></citerefentry>
117 </para>
118 </refsect1>
119 <refsect1 id="Copyright"><title>Copyright</title>
120 <para>
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>.
125 </para>
126 </refsect1>
127 </refentry>