summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/enable.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2003-01-14 04:55:45 +0000
committerBrian Paul <[email protected]>2003-01-14 04:55:45 +0000
commit610d59981a9f43fefe29b34ef19c184d28e2bef5 (patch)
tree6bac42c2fd25b19ed35260538c6d945de8d699d8 /src/mesa/main/enable.c
parentcf01d97dc3e23af067dd9633a2bfa61a6a794ce6 (diff)
First batch of code for GL_NV_fragment_program.
Re-org of some GL_NV_vertex_program code. Replace MAX_TEXTURE_UNITS with MAX_TEXTURE_COORD_UNITS and MAX_TEXTURE_IMAGE_UNITS.
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r--src/mesa/main/enable.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 744668fd293..84d03112160 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -1,8 +1,8 @@
-/* $Id: enable.c,v 1.71 2002/10/24 23:57:20 brianp Exp $ */
+/* $Id: enable.c,v 1.72 2003/01/14 04:55:45 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 4.1
+ * Version: 5.1
*
* Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
@@ -873,6 +873,16 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
break;
#endif /* FEATURE_NV_vertex_program */
+#if FEATURE_NV_fragment_program
+ case GL_FRAGMENT_PROGRAM_NV:
+ CHECK_EXTENSION(NV_fragment_program, cap);
+ if (ctx->FragmentProgram.Enabled == state)
+ return;
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
+ ctx->FragmentProgram.Enabled = state;
+ break;
+#endif /* FEATURE_NV_fragment_program */
+
/* GL_NV_texture_rectangle */
case GL_TEXTURE_RECTANGLE_NV:
CHECK_EXTENSION(NV_texture_rectangle, cap);
@@ -1265,6 +1275,12 @@ _mesa_IsEnabled( GLenum cap )
}
#endif /* FEATURE_NV_vertex_program */
+#if FEATURE_NV_fragment_program
+ case GL_FRAGMENT_PROGRAM_NV:
+ CHECK_EXTENSION(NV_fragment_program);
+ return ctx->FragmentProgram.Enabled;
+#endif /* FEATURE_NV_fragment_program */
+
/* GL_NV_texture_rectangle */
case GL_TEXTURE_RECTANGLE_NV:
CHECK_EXTENSION(NV_texture_rectangle);