301e2ede73882cab7c6e9ea4406b486a1504c3a9
[clinton/guile-figl.git] / upstream-man-pages / manglsl / gl_PointSize.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_PointSize">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2011</year>
9 <holder>Khronos Group</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>gl_PointSize</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>gl_PointSize</refname>
17 <refpurpose>contains size of rasterized points, in pixels</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>Declaration</title>
20 <para>
21 <function>gl_PointSize</function> is a member of the <function>gl_PerVertex</function>
22 named block:
23 </para>
24 <funcsynopsis>
25 <programlisting><![CDATA[ out gl_PerVertex {
26 vec4 gl_Position;
27 float gl_PointSize;
28 float gl_ClipDistance[];
29 };]]></programlisting>
30 </funcsynopsis>
31 </refsynopsisdiv>
32 <refsect1 id="description"><title>Description</title>
33 <para>
34 In the vertex, tessellation evaluation and geoemtry languages, a single
35 global instance of the <function>gl_PerVertex</function> named block is available and
36 its <function>gl_PointSize</function> member is an output that receives the
37 intended size of the point to be rasterized, in pixels. It may be written at any time
38 during shader execution. If <constant>GL_PROGRAM_POINT_SIZE</constant> is enabled,
39 <function>gl_PointSize</function> is used to determine the size of rasterized
40 points, otherwise it is ignored by the rasterization stage.
41 </para>
42 <para>
43 In the tessellation control language, the <function>gl_PerVertex</function> named block
44 is used to construct an array, <function>gl_out[]</function>, whose members become
45 available as inputs to the subsequent tessellation evaluation shader.
46 </para>
47 <para>
48 The value of <function>gl_PointSize</function> (or the <function>gl_PointSize</function> member of the <function>gl_out[]</function>
49 array, in the case of the tessellation control shader)
50 is undefined after the vertex, tessellation control, and tessellation evaluation
51 shading stages if the corresponding shader executable does
52 not write to gl_PointSize. It is also undefined after the geometry processing stage if the geometry shader executable calls
53 <citerefentry><refentrytitle>EmitVertex</refentrytitle></citerefentry> without having
54 written <function>gl_PointSize</function> since the last call to <citerefentry><refentrytitle>EmitVertex</refentrytitle></citerefentry>
55 (or hasn't written it at all).
56 </para>
57 <para>
58 In the tessellation control, tessellation evaluation and geoemetry languages,
59 the <function>gl_PerVertex</function> named block is used to construct an array, <function>gl_in[]</function>
60 of per-vertex or per-control point inputs whose content represents the corresponding
61 outputs written by the previous stage.
62 </para>
63 </refsect1>
64 <refsect1 id="versions"><title>Version Support</title>
65 <informaltable frame="topbot">
66 #VARTABLECOLS#
67 <thead>
68 #VARTABLEHEADER#
69 <row>
70 <entry>gl_PointSize (vertex shader)</entry>#newin11#
71 </row>
72 <row>
73 <entry>gl_PointSize (geometry shader)</entry>#newin15#
74 </row>
75 </thead>
76 </tgroup>
77 </informaltable>
78 </refsect1>
79 <refsect1 id="seealso"><title>See Also</title>
80 <para>
81 <citerefentry><refentrytitle>gl_Position</refentrytitle></citerefentry>, <citerefentry><refentrytitle>gl_ClipDistance</refentrytitle></citerefentry>
82 </para>
83 </refsect1>
84 <refsect1 id="Copyright"><title>Copyright</title>
85 <para>
86 Copyright <trademark class="copyright"></trademark> 2011 Khronos Group.
87 This material may be distributed subject to the terms and conditions set forth in
88 the Open Publication License, v 1.0, 8 June 1999.
89 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
90 </para>
91 </refsect1>
92 </refentry>