summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/enable.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/enable.c
parent516b8363bbe8e625e8e773630772da950eff7d2a (diff)
initial implementation of GL_HP_occlusion_test extension
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r--src/mesa/main/enable.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 94defaad74a..0e1a5781bdd 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -1,4 +1,4 @@
-/* $Id: enable.c,v 1.11 2000/03/07 18:24:49 brianp Exp $ */
+/* $Id: enable.c,v 1.12 2000/03/11 23:23:26 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -451,6 +451,18 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
ctx->Array.EdgeFlag.Enabled = state;
break;
+ /* GL_HP_occlusion_test */
+ case GL_OCCLUSION_TEST_HP:
+ if (ctx->Extensions.HaveHpOcclusionTest) {
+ ctx->Depth.OcclusionTest = state;
+ ctx->NewState |= NEW_RASTER_OPS;
+ }
+ else {
+ gl_error( ctx, GL_INVALID_ENUM, state ? "glEnable": "glDisable" );
+ return;
+ }
+ break;
+
default:
if (state) {
gl_error( ctx, GL_INVALID_ENUM, "glEnable" );
@@ -644,6 +656,17 @@ _mesa_IsEnabled( GLenum cap )
return ctx->Array.TexCoord[ctx->Array.ActiveTexture].Enabled;
case GL_EDGE_FLAG_ARRAY:
return ctx->Array.EdgeFlag.Enabled;
+
+ /* GL_HP_occlusion_test */
+ case GL_OCCLUSION_TEST_HP:
+ if (ctx->Extensions.HaveHpOcclusionTest) {
+ return ctx->Depth.OcclusionTest;
+ }
+ else {
+ gl_error( ctx, GL_INVALID_ENUM, "glIsEnabled" );
+ return GL_FALSE;
+ }
+
default:
gl_error( ctx, GL_INVALID_ENUM, "glIsEnabled" );
return GL_FALSE;