summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/enable.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2003-04-18 01:56:11 +0000
committerBrian Paul <[email protected]>2003-04-18 01:56:11 +0000
commit77eec61e21cf1ff4ef3c95fcc42700ca4a0a2c4f (patch)
tree30b1912ee19d3e4ca75541254a57a5009f9f067e /src/mesa/main/enable.c
parent5e92a7c7457f53fed576b65105a7a996a6044f55 (diff)
more GL_ARB_vertex/fragment_program bits
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r--src/mesa/main/enable.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index cd2e60e3ff8..5fe65493122 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -1,5 +1,3 @@
-/* $Id: enable.c,v 1.77 2003/03/21 13:18:33 brianp Exp $ */
-
/*
* Mesa 3-D graphics library
* Version: 5.1
@@ -915,6 +913,16 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
ctx->Stencil.TestTwoSide = state;
break;
+#if FEATURE_ARB_fragment_program
+ case GL_FRAGMENT_PROGRAM_ARB:
+ CHECK_EXTENSION(ARB_fragment_program, cap);
+ if (ctx->FragmentProgram.Enabled == state)
+ return;
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM | _NEW_TEXTURE);
+ ctx->FragmentProgram.Enabled = state;
+ break;
+#endif /* FEATURE_ARB_fragment_program */
+
default:
_mesa_error(ctx, GL_INVALID_ENUM,
"%s(0x%x)", state ? "glEnable" : "glDisable", cap);
@@ -1306,6 +1314,11 @@ _mesa_IsEnabled( GLenum cap )
CHECK_EXTENSION(EXT_stencil_two_side);
return ctx->Stencil.TestTwoSide;
+#if FEATURE_ARB_fragment_program
+ case GL_FRAGMENT_PROGRAM_ARB:
+ return ctx->FragmentProgram.Enabled;
+#endif /* FEATURE_ARB_fragment_program */
+
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabled(0x%x)", (int) cap);
return GL_FALSE;