From ed30dfa1264ec8875a3162c3c8778bc703bf11d5 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 3 Mar 2000 17:47:39 +0000 Subject: runtime selectable depth buffer depth --- src/mesa/main/image.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/mesa/main/image.c') 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); } } -- cgit v1.2.3