rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man4 / glDepthRangeIndexed.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="glDepthRangeIndexed">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2010</year>
9 <holder>Khronos Group</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glDepthRangeIndexed</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glDepthRangeIndexed</refname>
17 <refpurpose>specify mapping of depth values from normalized device coordinates to window coordinates for a specified viewport</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glDepthRangeIndexed</function></funcdef>
23 <paramdef>GLuint <parameter>index</parameter></paramdef>
24 <paramdef>GLdouble <parameter>nearVal</parameter></paramdef>
25 <paramdef>GLdouble <parameter>farVal</parameter></paramdef>
26 </funcprototype>
27 </funcsynopsis>
28 </refsynopsisdiv>
29 <!-- eqn: ignoring delim $$ -->
30 <refsect1 id="parameters"><title>Parameters</title>
31 <variablelist>
32 <varlistentry>
33 <term><parameter>index</parameter></term>
34 <listitem>
35 <para>
36 Specifies the index of the viewport whose depth range to update.
37 </para>
38 </listitem>
39 </varlistentry>
40 <varlistentry>
41 <term><parameter>nearVal</parameter></term>
42 <listitem>
43 <para>
44 Specifies the mapping of the near clipping plane to window coordinates.
45 The initial value is 0.
46 </para>
47 </listitem>
48 </varlistentry>
49 <varlistentry>
50 <term><parameter>farVal</parameter></term>
51 <listitem>
52 <para>
53 Specifies the mapping of the far clipping plane to window coordinates.
54 The initial value is 1.
55 </para>
56 </listitem>
57 </varlistentry>
58 </variablelist>
59 </refsect1>
60 <refsect1 id="description"><title>Description</title>
61 <para>
62 After clipping and division by <emphasis>w</emphasis>,
63 depth coordinates range from
64 <inlineequation><mml:math>
65 <!-- eqn: -1: -->
66 <mml:mn>-1</mml:mn>
67 </mml:math></inlineequation>
68 to 1,
69 corresponding to the near and far clipping planes.
70 Each viewport has an independent depth range specified as a linear mapping of the normalized
71 depth coordinates in this range to window depth coordinates.
72 Regardless of the actual depth buffer implementation,
73 window coordinate depth values are treated as though they range
74 from 0 through 1 (like color components).
75 <function>glDepthRangeIndexed</function> specifies a linear mapping of the normalized depth coordinates
76 in this range to window depth coordinates for a specified viewport.
77 Thus,
78 the values accepted by <function>glDepthRangeIndexed</function> are both clamped to this range
79 before they are accepted.
80 </para>
81 <para>
82 The <parameter>index</parameter> parameter specifies the index of first viewport whose depth
83 range to modify and must be less than the value of <constant>GL_MAX_VIEWPORTS</constant>.
84 <parameter>nearVal</parameter> and <parameter>farVal</parameter> specify near and far values of the
85 depth range for the specified viewport, respectively.
86 </para>
87 <para>
88 The setting of (0,1) maps the near plane to 0 and
89 the far plane to 1.
90 With this mapping,
91 the depth buffer range is fully utilized.
92 </para>
93 </refsect1>
94 <refsect1 id="notes"><title>Notes</title>
95 <para>
96 It is not necessary that the near plane distance be less than the far plane distance.
97 Reverse mappings such as
98 <inlineequation><mml:math>
99 <!-- eqn: nearVal = 1: -->
100 <mml:mrow>
101 <mml:mi mathvariant="italic">nearVal</mml:mi>
102 <mml:mo>=</mml:mo>
103 <mml:mn>1</mml:mn>
104 </mml:mrow>
105 </mml:math></inlineequation>,
106 and
107 <inlineequation><mml:math>
108 <!-- eqn: farVal = 0: -->
109 <mml:mrow>
110 <mml:mi mathvariant="italic">farVal</mml:mi>
111 <mml:mo>=</mml:mo>
112 <mml:mn>0</mml:mn>
113 </mml:mrow>
114 </mml:math></inlineequation>
115 are acceptable.
116 </para>
117 <para>
118 The type of the <parameter>nearVal</parameter> and
119 <parameter>farVal</parameter> parameters was changed from
120 GLclampd to GLdouble. This change is transparent to user
121 code and is described in detail on the
122 <citerefentry><refentrytitle>removedTypes</refentrytitle></citerefentry>
123 page.
124 </para>
125 </refsect1>
126 <refsect1 id="errors"><title>Errors</title>
127 <para>
128 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>index</parameter> is greater than or equal to
129 the value of <constant>GL_MAX_VIEWPORTS</constant>.
130 </para>
131 </refsect1>
132 <refsect1 id="associatedgets"><title>Associated Gets</title>
133 <para>
134 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_DEPTH_RANGE</constant>
135 </para>
136 </refsect1>
137 <refsect1 id="seealso"><title>See Also</title>
138 <para>
139 <citerefentry><refentrytitle>glDepthFunc</refentrytitle></citerefentry>,
140 <citerefentry><refentrytitle>glDepthRange</refentrytitle></citerefentry>,
141 <citerefentry><refentrytitle>glDepthRangeArray</refentrytitle></citerefentry>,
142 <citerefentry><refentrytitle>glPolygonOffset</refentrytitle></citerefentry>,
143 <citerefentry><refentrytitle>glViewportArray</refentrytitle></citerefentry>,
144 <citerefentry><refentrytitle>glViewport</refentrytitle></citerefentry>,
145 <citerefentry><refentrytitle>removedTypes</refentrytitle></citerefentry>
146 </para>
147 </refsect1>
148 <refsect1 id="Copyright"><title>Copyright</title>
149 <para>
150 Copyright <trademark class="copyright"></trademark> 2010 Khronos Group.
151 This material may be distributed subject to the terms and conditions set forth in
152 the Open Publication License, v 1.0, 8 June 1999.
153 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
154 </para>
155 </refsect1>
156 </refentry>