rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / manglsl / gl_Position.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="gl_Position">\r
5 <refmeta>\r
6 <refmetainfo>\r
7 <copyright>\r
8 <year>2011</year>\r
9 <holder>Khronos Group</holder>\r
10 </copyright>\r
11 </refmetainfo>\r
12 <refentrytitle>gl_Position</refentrytitle>\r
13 <manvolnum>3G</manvolnum>\r
14 </refmeta>\r
15 <refnamediv>\r
16 <refname>gl_Position</refname>\r
17 <refpurpose>contains the position of the current vertex</refpurpose>\r
18 </refnamediv>\r
19 <refsynopsisdiv><title>Declaration</title>\r
20 <para>\r
21 <function>gl_Position</function> is a member of the <function>gl_PerVertex</function>\r
22 named block:\r
23 </para>\r
24 <funcsynopsis>\r
25<programlisting><![CDATA[ out gl_PerVertex {\r
26 vec4 gl_Position;\r
27 float gl_PointSize;\r
28 float gl_ClipDistance[];\r
29 };]]></programlisting>\r
30 </funcsynopsis>\r
31 </refsynopsisdiv>\r
32 <refsect1 id="description"><title>Description</title>\r
33 <para>\r
34 In the vertex, tessellation evaluation and geoemtry languages, a single\r
35 global instance of the <function>gl_PerVertex</function> named block is available and\r
36 its <function>gl_Position</function> member is an output that receives the\r
37 homogeneous vertex position. It may be written at any time during shader execution.\r
38 The value written to <function>gl_Position</function> will be used by primitive assembly,\r
39 clipping, culling and other fixed functionality operations, if present, that operate on\r
40 primitives after vertex processing has occurred.\r
41 </para>\r
42 <para>\r
43 In the tessellation control language, the <function>gl_PerVertex</function> named block\r
44 is used to construct an array, <function>gl_out[]</function>, whose <function>gl_Position</function>\r
45 members hold the homogeneous control point position, which become available as inputs to the subsequent\r
46 tessellation evaluation shader.\r
47 </para>\r
48 <para>\r
49 The value of <function>gl_Position</function> (or the <function>gl_Position</function> member of the <function>gl_out[]</function>\r
50 array, in the case of the tessellation control shader)\r
51 is undefined after the vertex, tessellation control, and tessellation evaluation\r
52 shading stages if the corresponding shader executable does\r
53 not write to gl_Position. It is also undefined after the geometry processing stage if the geometry shader executable calls\r
54 <citerefentry><refentrytitle>EmitVertex</refentrytitle></citerefentry> without having\r
55 written <function>gl_Position</function> since the last call to <citerefentry><refentrytitle>EmitVertex</refentrytitle></citerefentry>\r
56 (or hasn't written it at all).\r
57 </para>\r
58 <para>\r
59 In the tessellation control, tessellation evaluation and geoemetry languages,\r
60 the <function>gl_PerVertex</function> named block is used to construct an array, <function>gl_in[]</function>\r
61 of per-vertex or per-control point inputs whose content represents the corresponding\r
62 outputs written by the previous stage.\r
63 </para>\r
64 </refsect1>\r
65 <refsect1 id="versions"><title>Version Support</title>\r
66 <informaltable frame="topbot">\r
67 <tgroup cols="3" align="left">\r
68 <colspec colwidth="1.1*" />\r
69 <colspec colwidth="1*" align="center" />\r
70 <colspec colwidth="1*" align="center" />\r
71 <colspec colwidth="1*" align="center" />\r
72 <colspec colwidth="1*" align="center" />\r
73 <colspec colwidth="1*" align="center" />\r
74 <colspec colwidth="1*" align="center" />\r
75 <colspec colwidth="1*" align="center" />\r
76 <colspec colwidth="1*" align="center" />\r
77 <thead>\r
78 <row>\r
79 <entry rowsep="1" align="left"><emphasis role="bold">\r
80 Variable\r
81 </emphasis></entry>\r
82 <entry rowsep="1" align="left"><emphasis role="bold">\r
83 Version 1.10\r
84 </emphasis></entry>\r
85 <entry rowsep="1" align="left"><emphasis role="bold">\r
86 Version 1.20\r
87 </emphasis></entry>\r
88 <entry rowsep="1" align="left"><emphasis role="bold">\r
89 Version 1.30\r
90 </emphasis></entry>\r
91 <entry rowsep="1" align="left"><emphasis role="bold">\r
92 Version 1.40\r
93 </emphasis></entry>\r
94 <entry rowsep="1" align="left"><emphasis role="bold">\r
95 Version 1.50\r
96 </emphasis></entry>\r
97 <entry rowsep="1" align="left"><emphasis role="bold">\r
98 Version 3.30\r
99 </emphasis></entry>\r
100 <entry rowsep="1" align="left"><emphasis role="bold">\r
101 Version 4.00\r
102 </emphasis></entry>\r
103 <entry rowsep="1" align="left"><emphasis role="bold">\r
104 Version 4.10\r
105 </emphasis></entry>\r
106 </row>\r
107 <row>\r
108 <entry>\r
109 gl_Position\r
110 </entry>\r
111 <entry>\r
112 <emphasis>Y</emphasis><superscript>1</superscript> <!-- 1.10, OpenGL 2.0 -->\r
113 </entry>\r
114 <entry>\r
115 <emphasis>Y</emphasis><superscript>1</superscript> <!-- 1.20, OpenGL 2.1 -->\r
116 </entry>\r
117 <entry>\r
118 <emphasis>Y</emphasis><superscript>1</superscript> <!-- 1.30, OpenGL 3.0 -->\r
119 </entry>\r
120 <entry>\r
121 <emphasis>Y</emphasis><superscript>1</superscript> <!-- 1.40, OpenGL 3.1 -->\r
122 </entry>\r
123 <entry>\r
124 <emphasis>Y</emphasis><superscript>2</superscript> <!-- 1.50, OpenGL 3.2 -->\r
125 </entry>\r
126 <entry>\r
127 <emphasis>Y</emphasis><superscript>2</superscript> <!-- 3.30, OpenGL 3.3 -->\r
128 </entry>\r
129 <entry>\r
130 <emphasis>Y</emphasis> <!-- 4.00, OpenGL 4.0 -->\r
131 </entry>\r
132 <entry>\r
133 <emphasis>Y</emphasis> <!-- 4.10, OpenGL 4.1 -->\r
134 </entry>\r
135 </row>\r
136 </thead>\r
137 </tgroup>\r
138 </informaltable>\r
139 <para>Versions 1.10 to 1.40 - vertex shader only.</para>\r
140 <para>Versions 1.50 to 3.30 - vertex and geometry shaders only.</para>\r
141 </refsect1>\r
142 <refsect1 id="seealso"><title>See Also</title>\r
143 <para>\r
144 <citerefentry><refentrytitle>gl_PointSize</refentrytitle></citerefentry>, <citerefentry><refentrytitle>gl_ClipDistance</refentrytitle></citerefentry>\r
145 </para>\r
146 </refsect1>\r
147 <refsect1 id="Copyright"><title>Copyright</title>\r
148 <para>\r
149 Copyright <trademark class="copyright"></trademark> 2011 Khronos Group. \r
150 This material may be distributed subject to the terms and conditions set forth in \r
151 the Open Publication License, v 1.0, 8 June 1999.\r
152 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.\r
153 </para>\r
154 </refsect1>\r
155</refentry>\r