aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/depth.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2000-09-08 21:28:04 +0000
committerBrian Paul <[email protected]>2000-09-08 21:28:04 +0000
commit48c6a6ecd2b94d73317f1579193d98101566217a (patch)
tree2de10e0a4070195594e73898d6051c3ad266d921 /src/mesa/main/depth.c
parente18e0e98fea2384892324c84bf463d65c1159f7b (diff)
changed gl_frame_buffer Xmax and Ymax to be exclusive boundary values
Diffstat (limited to 'src/mesa/main/depth.c')
-rw-r--r--src/mesa/main/depth.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/main/depth.c b/src/mesa/main/depth.c
index 8a09206a6a9..fc37c29c1c3 100644
--- a/src/mesa/main/depth.c
+++ b/src/mesa/main/depth.c
@@ -1,4 +1,4 @@
-/* $Id: depth.c,v 1.17 2000/04/11 20:42:22 brianp Exp $ */
+/* $Id: depth.c,v 1.18 2000/09/08 21:28:04 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -1629,7 +1629,7 @@ _mesa_clear_depth_buffer( GLcontext *ctx )
/* only clear scissor region */
if (ctx->Visual->DepthBits <= 16) {
const GLushort clearValue = (GLushort) (ctx->Depth.Clear * ctx->Visual->DepthMax);
- const GLint rows = ctx->DrawBuffer->Ymax - ctx->DrawBuffer->Ymin + 1;
+ const GLint rows = ctx->DrawBuffer->Ymax - ctx->DrawBuffer->Ymin;
const GLint width = ctx->DrawBuffer->Width;
GLushort *dRow = (GLushort *) ctx->DrawBuffer->DepthBuffer
+ ctx->DrawBuffer->Ymin * width + ctx->DrawBuffer->Xmin;
@@ -1643,7 +1643,7 @@ _mesa_clear_depth_buffer( GLcontext *ctx )
}
else {
const GLuint clearValue = (GLuint) (ctx->Depth.Clear * ctx->Visual->DepthMax);
- const GLint rows = ctx->DrawBuffer->Ymax - ctx->DrawBuffer->Ymin + 1;
+ const GLint rows = ctx->DrawBuffer->Ymax - ctx->DrawBuffer->Ymin;
const GLint width = ctx->DrawBuffer->Width;
GLuint *dRow = (GLuint *) ctx->DrawBuffer->DepthBuffer
+ ctx->DrawBuffer->Ymin * width + ctx->DrawBuffer->Xmin;