changes for GL_HP_occlusion_test

This commit is contained in:
Brian Paul
2000-04-01 05:42:06 +00:00
parent 25673f0cba
commit 199d039bc3
2 changed files with 7 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
/* $Id: drawpix.c,v 1.15 2000/03/21 01:03:40 brianp Exp $ */ /* $Id: drawpix.c,v 1.16 2000/04/01 05:42:06 brianp Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -681,6 +681,8 @@ _mesa_DrawPixels( GLsizei width, GLsizei height,
x = (GLint) (ctx->Current.RasterPos[0] + 0.5F); x = (GLint) (ctx->Current.RasterPos[0] + 0.5F);
y = (GLint) (ctx->Current.RasterPos[1] + 0.5F); y = (GLint) (ctx->Current.RasterPos[1] + 0.5F);
ctx->OcclusionResult = GL_TRUE;
/* see if device driver can do the drawpix */ /* see if device driver can do the drawpix */
if (ctx->Driver.DrawPixels if (ctx->Driver.DrawPixels
&& (*ctx->Driver.DrawPixels)(ctx, x, y, width, height, format, type, && (*ctx->Driver.DrawPixels)(ctx, x, y, width, height, format, type,

View File

@@ -1,4 +1,4 @@
/* $Id: state.c,v 1.5 2000/03/11 23:23:26 brianp Exp $ */ /* $Id: state.c,v 1.6 2000/04/01 05:42:06 brianp Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -791,16 +791,9 @@ static void update_rasterflags( GLcontext *ctx )
ctx->RasterMask |= WINCLIP_BIT; ctx->RasterMask |= WINCLIP_BIT;
} }
if (ctx->Depth.OcclusionTest) { if (ctx->Depth.OcclusionTest)
if (ctx->Color.ColorMask[0] == 0 && ctx->RasterMask |= OCCLUSION_BIT;
ctx->Color.ColorMask[1] == 0 &&
ctx->Color.ColorMask[2] == 0 &&
ctx->Color.ColorMask[3] == 0 &&
ctx->Depth.Mask == GL_FALSE &&
!ctx->Stencil.Enabled) {
ctx->RasterMask |= OCCLUSION_BIT;
}
}
/* If we're not drawing to exactly one color buffer set the /* If we're not drawing to exactly one color buffer set the
* MULTI_DRAW_BIT flag. Also set it if we're drawing to no * MULTI_DRAW_BIT flag. Also set it if we're drawing to no