include more low-level bindings
[clinton/guile-figl.git] / upstream-man-pages / man3 / glDepthRange.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="glDepthRange">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>1991-2006</year>
9 <holder>Silicon Graphics, Inc.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glDepthRange</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glDepthRange</refname>
17 <refpurpose>specify mapping of depth values from normalized device coordinates to window coordinates</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glDepthRange</function></funcdef>
23 <paramdef>GLclampd <parameter>nearVal</parameter></paramdef>
24 <paramdef>GLclampd <parameter>farVal</parameter></paramdef>
25 </funcprototype>
26 </funcsynopsis>
27 </refsynopsisdiv>
28 <!-- eqn: ignoring delim $$ -->
29 <refsect1 id="parameters"><title>Parameters</title>
30 <variablelist>
31 <varlistentry>
32 <term><parameter>nearVal</parameter></term>
33 <listitem>
34 <para>
35 Specifies the mapping of the near clipping plane to window coordinates.
36 The initial value is 0.
37 </para>
38 </listitem>
39 </varlistentry>
40 <varlistentry>
41 <term><parameter>farVal</parameter></term>
42 <listitem>
43 <para>
44 Specifies the mapping of the far clipping plane to window coordinates.
45 The initial value is 1.
46 </para>
47 </listitem>
48 </varlistentry>
49 </variablelist>
50 </refsect1>
51 <refsect1 id="description"><title>Description</title>
52 <para>
53 After clipping and division by <emphasis>w</emphasis>,
54 depth coordinates range from
55 <inlineequation><mml:math>
56 <!-- eqn: -1: -->
57 <mml:mn>-1</mml:mn>
58 </mml:math></inlineequation>
59 to 1,
60 corresponding to the near and far clipping planes.
61 <function>glDepthRange</function> specifies a linear mapping of the normalized depth coordinates
62 in this range to window depth coordinates.
63 Regardless of the actual depth buffer implementation,
64 window coordinate depth values are treated as though they range
65 from 0 through 1 (like color components).
66 Thus,
67 the values accepted by <function>glDepthRange</function> are both clamped to this range
68 before they are accepted.
69 </para>
70 <para>
71 The setting of (0,1) maps the near plane to 0 and
72 the far plane to 1.
73 With this mapping,
74 the depth buffer range is fully utilized.
75 </para>
76 </refsect1>
77 <refsect1 id="notes"><title>Notes</title>
78 <para>
79 It is not necessary that <parameter>nearVal</parameter> be less than <parameter>farVal</parameter>.
80 Reverse mappings such as
81 <inlineequation><mml:math>
82 <!-- eqn: nearVal = 1: -->
83 <mml:mrow>
84 <mml:mi mathvariant="italic">nearVal</mml:mi>
85 <mml:mo>=</mml:mo>
86 <mml:mn>1</mml:mn>
87 </mml:mrow>
88 </mml:math></inlineequation>,
89 and
90 <inlineequation><mml:math>
91 <!-- eqn: farVal = 0: -->
92 <mml:mrow>
93 <mml:mi mathvariant="italic">farVal</mml:mi>
94 <mml:mo>=</mml:mo>
95 <mml:mn>0</mml:mn>
96 </mml:mrow>
97 </mml:math></inlineequation>
98 are acceptable.
99 </para>
100 </refsect1>
101 <refsect1 id="associatedgets"><title>Associated Gets</title>
102 <para>
103 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_DEPTH_RANGE</constant>
104 </para>
105 </refsect1>
106 <refsect1 id="seealso"><title>See Also</title>
107 <para>
108 <citerefentry><refentrytitle>glDepthFunc</refentrytitle></citerefentry>,
109 <citerefentry><refentrytitle>glPolygonOffset</refentrytitle></citerefentry>,
110 <citerefentry><refentrytitle>glViewport</refentrytitle></citerefentry>
111 </para>
112 </refsect1>
113 <refsect1 id="Copyright"><title>Copyright</title>
114 <para>
115 Copyright <trademark class="copyright"></trademark> 1991-2006
116 Silicon Graphics, Inc. This document is licensed under the SGI
117 Free Software B License. For details, see
118 <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
119 </para>
120 </refsect1>
121 </refentry>