From fe5d67d95f3a5fc84c5421d409a6464642aaf2cb Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Fri, 27 Oct 2000 16:44:40 +0000 Subject: Implement EXT_fog_coord and EXT_secondary_color. EXT_secondary_color is disabled until we get some dispatch offsets from SGI. --- src/mesa/main/enable.c | 18 +++++++++++++++++- 1 file changed, 17 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 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" ); } -- cgit v1.2.3