From a670c1280b78e6da3b298b61f623e4c733c6be94 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 19 Apr 2002 00:38:27 +0000 Subject: casts to fix GLint/GLuint mismatches --- src/mesa/swrast/s_depth.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/mesa/swrast/s_depth.c') diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c index 6b1646b7a04..0c0a5b6fe18 100644 --- a/src/mesa/swrast/s_depth.c +++ b/src/mesa/swrast/s_depth.c @@ -1,4 +1,4 @@ -/* $Id: s_depth.c,v 1.21 2002/04/18 14:57:00 brianp Exp $ */ +/* $Id: s_depth.c,v 1.22 2002/04/19 00:38:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -1378,8 +1378,8 @@ _mesa_read_depth_span( GLcontext *ctx, { SWcontext *swrast = SWRAST_CONTEXT(ctx); - if (y < 0 || y >= ctx->DrawBuffer->Height || - x + (GLint) n <= 0 || x >= ctx->DrawBuffer->Width) { + if (y < 0 || y >= (GLint) ctx->DrawBuffer->Height || + x + (GLint) n <= 0 || x >= (GLint) ctx->DrawBuffer->Width) { /* span is completely outside framebuffer */ GLint i; for (i = 0; i < n; i++) @@ -1396,8 +1396,8 @@ _mesa_read_depth_span( GLcontext *ctx, n -= dx; depth += dx; } - if (x + n > ctx->DrawBuffer->Width) { - GLint dx = x + n - ctx->DrawBuffer->Width; + if (x + n > (GLint) ctx->DrawBuffer->Width) { + GLint dx = x + n - (GLint) ctx->DrawBuffer->Width; GLint i; for (i = 0; i < dx; i++) depth[n - i - 1] = 0; @@ -1452,8 +1452,8 @@ _mesa_read_depth_span_float( GLcontext *ctx, SWcontext *swrast = SWRAST_CONTEXT(ctx); const GLfloat scale = 1.0F / ctx->DepthMaxF; - if (y < 0 || y >= ctx->DrawBuffer->Height || - x + (GLint) n <= 0 || x >= ctx->DrawBuffer->Width) { + if (y < 0 || y >= (GLint) ctx->DrawBuffer->Height || + x + (GLint) n <= 0 || x >= (GLint) ctx->DrawBuffer->Width) { /* span is completely outside framebuffer */ GLint i; for (i = 0; i < n; i++) @@ -1469,8 +1469,8 @@ _mesa_read_depth_span_float( GLcontext *ctx, n -= dx; x = 0; } - if (x + n > ctx->DrawBuffer->Width) { - GLint dx = x + n - ctx->DrawBuffer->Width; + if (x + n > (GLint) ctx->DrawBuffer->Width) { + GLint dx = x + n - (GLint) ctx->DrawBuffer->Width; GLint i; for (i = 0; i < dx; i++) depth[n - i - 1] = 0.0F; -- cgit v1.2.3