diff options
author | Brian Paul <[email protected]> | 2000-03-03 17:47:39 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2000-03-03 17:47:39 +0000 |
commit | ed30dfa1264ec8875a3162c3c8778bc703bf11d5 (patch) | |
tree | 41e44fc1f73964396c96dea1452f235b42ff46ec /src/mesa/main/image.c | |
parent | 8df3d8ae6c48cbbe649e8cfeebd8a99f983784f7 (diff) |
runtime selectable depth buffer depth
Diffstat (limited to 'src/mesa/main/image.c')
-rw-r--r-- | src/mesa/main/image.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index e37711e4992..a1a0fe20eec 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main/image.c @@ -1,4 +1,4 @@ -/* $Id: image.c,v 1.17 2000/02/21 16:33:20 brianp Exp $ */ +/* $Id: image.c,v 1.18 2000/03/03 17:47:39 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -2644,9 +2644,10 @@ _mesa_unpack_depth_span( const GLcontext *ctx, GLuint n, GLdepth *dest, /* clamp depth values to [0,1] and convert from floats to integers */ { + const GLfloat zs = ctx->Visual->DepthMaxF; GLuint i; for (i = 0; i < n; i++) { - dest[i] = (GLdepth) (CLAMP(depth[i], 0.0F, 1.0F) * DEPTH_SCALE); + dest[i] = (GLdepth) (CLAMP(depth[i], 0.0F, 1.0F) * zs); } } |