From 5f60a0b50ada1865d4fc6a724366e8ea0cc9a72f Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 6 Sep 2002 02:56:08 +0000 Subject: GL_EXT_stencil_two_side extension, not 100% complete yet. --- src/mesa/main/enable.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/mesa/main/enable.c') diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 140358b463..0f51078c61 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -1,4 +1,4 @@ -/* $Id: enable.c,v 1.68 2002/06/29 19:48:15 brianp Exp $ */ +/* $Id: enable.c,v 1.69 2002/09/06 02:56:08 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -875,6 +875,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) /* GL_NV_texture_rectangle */ case GL_TEXTURE_RECTANGLE_NV: + CHECK_EXTENSION(NV_texture_rectangle, cap); { const GLuint curr = ctx->Texture.CurrentUnit; struct gl_texture_unit *texUnit = &ctx->Texture.Unit[curr]; @@ -889,6 +890,15 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) } break; + /* GL_EXT_stencil_two_side */ + case GL_STENCIL_TEST_TWO_SIDE_EXT: + CHECK_EXTENSION(EXT_stencil_two_side, cap); + if (ctx->Stencil.TestTwoSide == state) + return; + FLUSH_VERTICES(ctx, _NEW_STENCIL); + ctx->Stencil.TestTwoSide = state; + break; + default: _mesa_error(ctx, GL_INVALID_ENUM, "%s(0x%x)", state ? "glEnable" : "glDisable", cap); @@ -1263,6 +1273,11 @@ _mesa_IsEnabled( GLenum cap ) return (texUnit->Enabled & TEXTURE_RECT_BIT) ? GL_TRUE : GL_FALSE; } + /* GL_EXT_stencil_two_side */ + case GL_STENCIL_TEST_TWO_SIDE_EXT: + CHECK_EXTENSION(EXT_stencil_two_side); + return ctx->Stencil.TestTwoSide; + default: _mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabled(0x%x)", (int) cap); return GL_FALSE; -- cgit v1.2.3