diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2003-04-21 15:02:17 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2003-04-21 15:02:17 +0000 |
commit | e5b244ff7f984805c1bcc020342f1300f2639c71 (patch) | |
tree | 2662820db42730bb1f0269a2aef440309a81d083 /src/mesa/main/enable.c | |
parent | 2780bb824f542c47d5412a3909eaa84ed3f13451 (diff) |
Implemented GL_EXT_depth_bounds_test.
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r-- | src/mesa/main/enable.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 5fe65493122..747c3f63c1b 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -923,6 +923,20 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) break; #endif /* FEATURE_ARB_fragment_program */ + /* GL_EXT_depth_bounds_test */ + case GL_DEPTH_BOUNDS_TEST_EXT: + CHECK_EXTENSION(EXT_depth_bounds_test, cap); + if (state && ctx->Visual.depthBits==0) { + _mesa_warning(ctx, + "glEnable(GL_DEPTH_BOUNDS_TEST_EXT) but no depth buffer"); + return; + } + if (ctx->Depth.BoundsTest == state) + return; + FLUSH_VERTICES(ctx, _NEW_DEPTH); + ctx->Depth.BoundsTest = state; + break; + default: _mesa_error(ctx, GL_INVALID_ENUM, "%s(0x%x)", state ? "glEnable" : "glDisable", cap); @@ -1319,6 +1333,11 @@ _mesa_IsEnabled( GLenum cap ) return ctx->FragmentProgram.Enabled; #endif /* FEATURE_ARB_fragment_program */ + /* GL_EXT_depth_bounds_test */ + case GL_DEPTH_BOUNDS_TEST_EXT: + CHECK_EXTENSION(EXT_depth_bounds_test); + return ctx->Depth.BoundsTest; + default: _mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabled(0x%x)", (int) cap); return GL_FALSE; |