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