summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/enable.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2003-07-21 04:22:40 +0000
committerBrian Paul <[email protected]>2003-07-21 04:22:40 +0000
commit08ff059f203f05a0cc417a46fe37f83929963db5 (patch)
treea60fb074a49d3430f3a62c0319db1a7e1ef50224 /src/mesa/main/enable.c
parent190c11e06d0f33c6815c19f36bb6f8f90d2ac2be (diff)
Initial implementation of GL_MESA_program_debug - a vertex/fragment program
debugging extension.
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r--src/mesa/main/enable.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index de08fa35135..3106a987f8a 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -971,6 +971,16 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
ctx->Depth.BoundsTest = state;
break;
+ /* GL_MESA_program_debug */
+ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
+ CHECK_EXTENSION(MESA_program_debug, cap);
+ ctx->FragmentProgram.CallbackEnabled = state;
+ break;
+ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
+ CHECK_EXTENSION(MESA_program_debug, cap);
+ ctx->VertexProgram.CallbackEnabled = state;
+ break;
+
default:
_mesa_error(ctx, GL_INVALID_ENUM,
"%s(0x%x)", state ? "glEnable" : "glDisable", cap);
@@ -1401,6 +1411,14 @@ _mesa_IsEnabled( GLenum cap )
CHECK_EXTENSION(EXT_depth_bounds_test);
return ctx->Depth.BoundsTest;
+ /* GL_MESA_program_debug */
+ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
+ CHECK_EXTENSION(MESA_program_debug);
+ return ctx->FragmentProgram.CallbackEnabled;
+ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
+ CHECK_EXTENSION(MESA_program_debug);
+ return ctx->VertexProgram.CallbackEnabled;
+
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabled(0x%x)", (int) cap);
return GL_FALSE;