1GLDEPTHRANGE(3G)                 OpenGL Manual                GLDEPTHRANGE(3G)
2
3
4

NAME

6       glDepthRange - specify mapping of depth values from normalized device
7       coordinates to window coordinates
8

C SPECIFICATION

10       void glDepthRange(GLdouble nearVal, GLdouble farVal);
11
12       void glDepthRangef(GLfloat nearVal, GLfloat farVal);
13

PARAMETERS

15       nearVal
16           Specifies the mapping of the near clipping plane to window
17           coordinates. The initial value is 0.
18
19       farVal
20           Specifies the mapping of the far clipping plane to window
21           coordinates. The initial value is 1.
22

DESCRIPTION

24       After clipping and division by w, depth coordinates range from -1 to 1,
25       corresponding to the near and far clipping planes.  glDepthRange
26       specifies a linear mapping of the normalized depth coordinates in this
27       range to window depth coordinates. Regardless of the actual depth
28       buffer implementation, window coordinate depth values are treated as
29       though they range from 0 through 1 (like color components). Thus, the
30       values accepted by glDepthRange are both clamped to this range before
31       they are accepted.
32
33       The setting of (0,1) maps the near plane to 0 and the far plane to 1.
34       With this mapping, the depth buffer range is fully utilized.
35

NOTES

37       It is not necessary that nearVal be less than farVal. Reverse mappings
38       such as nearVal = 1, and farVal = 0 are acceptable.
39
40       The type of the nearVal and farVal parameters was changed from GLclampf
41       to GLfloat for glDepthRangef and from GLclampd to GLdouble for
42       glDepthRange. This change is transparent to user code and is described
43       in detail on the removedTypes() page.
44

ASSOCIATED GETS

46       glGet() with argument GL_DEPTH_RANGE
47

SEE ALSO

49       glDepthFunc(), glPolygonOffset(), glViewport(), removedTypes()
50
52       Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
53       under the SGI Free Software B License. For details, see
54       http://oss.sgi.com/projects/FreeB/.
55

AUTHORS

57       opengl.org
58
59
60
61opengl.org                        06/10/2014                  GLDEPTHRANGE(3G)
Impressum