summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/state.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2000-03-11 23:23:26 +0000
committerBrian Paul <[email protected]>2000-03-11 23:23:26 +0000
commit1b2ff69f468d609a88b1cd31041df2b81931816b (patch)
tree233ec4149c5b15bb7c348f207454ca4d9623128b /src/mesa/main/state.c
parent516b8363bbe8e625e8e773630772da950eff7d2a (diff)
initial implementation of GL_HP_occlusion_test extension
Diffstat (limited to 'src/mesa/main/state.c')
-rw-r--r--src/mesa/main/state.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 667953a65ca..d82ffa57448 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -1,4 +1,4 @@
-/* $Id: state.c,v 1.4 2000/02/24 22:04:03 brianp Exp $ */
+/* $Id: state.c,v 1.5 2000/03/11 23:23:26 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -791,11 +791,21 @@ static void update_rasterflags( GLcontext *ctx )
ctx->RasterMask |= WINCLIP_BIT;
}
+ if (ctx->Depth.OcclusionTest) {
+ if (ctx->Color.ColorMask[0] == 0 &&
+ 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
* MULTI_DRAW_BIT flag. Also set it if we're drawing to no
* buffers or the RGBA or CI mask disables all writes.
*/
-
ctx->TriangleCaps &= ~DD_MULTIDRAW;
if (ctx->Color.MultiDrawBuffer) {