summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/enable.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2000-10-27 16:44:40 +0000
committerKeith Whitwell <[email protected]>2000-10-27 16:44:40 +0000
commitfe5d67d95f3a5fc84c5421d409a6464642aaf2cb (patch)
treee425a9d97e9e1bbdf4848b313c7c1548db11cb36 /src/mesa/main/enable.c
parentba58a6665f21319a636ec4c09f7f592fbc8e36b5 (diff)
Implement EXT_fog_coord and EXT_secondary_color.
EXT_secondary_color is disabled until we get some dispatch offsets from SGI.
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r--src/mesa/main/enable.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index a706ea5d3d7..2c0e3334c74 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -1,4 +1,4 @@
-/* $Id: enable.c,v 1.26 2000/10/21 01:29:12 brianp Exp $ */
+/* $Id: enable.c,v 1.27 2000/10/27 16:44:40 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -535,6 +535,16 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
}
break;
+ /* GL_EXT_secondary_color */
+ case GL_COLOR_SUM_EXT:
+ ctx->Fog.ColorSumEnabled = state;
+ if (state)
+ SET_BITS(ctx->TriangleCaps, DD_SEPERATE_SPECULAR);
+ else if (ctx->Light.Model.ColorControl == GL_SINGLE_COLOR)
+ CLEAR_BITS(ctx->TriangleCaps, DD_SEPERATE_SPECULAR);
+ ctx->NewState |= NEW_RASTER_OPS;
+ break;
+
default:
gl_error(ctx, GL_INVALID_ENUM, state ? "glEnable" : "glDisable");
return;
@@ -815,6 +825,12 @@ client_state( GLcontext *ctx, GLenum cap, GLboolean state )
case GL_EDGE_FLAG_ARRAY:
ctx->Array.EdgeFlag.Enabled = state;
break;
+ case GL_FOG_COORDINATE_ARRAY_EXT:
+ ctx->Array.FogCoord.Enabled = state;
+ break;
+ case GL_SECONDARY_COLOR_ARRAY_EXT:
+ ctx->Array.SecondaryColor.Enabled = state;
+ break;
default:
gl_error( ctx, GL_INVALID_ENUM, "glEnable/DisableClientState" );
}