From: Brian Paul Date: Tue, 19 Oct 1999 20:32:40 +0000 (+0000) Subject: clean-up in gl_LightModelfv() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f3f9b773244d0c1f5518e07127a7c273d4e3989e;p=mesa.git clean-up in gl_LightModelfv() --- diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c index 966b548082b..dbbe618e123 100644 --- a/src/mesa/main/light.c +++ b/src/mesa/main/light.c @@ -1,4 +1,4 @@ -/* $Id: light.c,v 1.5 1999/10/19 18:37:04 keithw Exp $ */ +/* $Id: light.c,v 1.6 1999/10/19 20:32:40 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -319,15 +319,18 @@ void gl_LightModelfv( GLcontext *ctx, GLenum pname, const GLfloat *params ) ctx->Light.Model.TwoSide = GL_TRUE; break; case GL_LIGHT_MODEL_COLOR_CONTROL: - ctx->TriangleCaps &= ~DD_SEPERATE_SPECULAR; - ctx->NewState |= NEW_RASTER_OPS; - if (params[0] == (GLfloat) GL_SINGLE_COLOR) + if (params[0] == (GLfloat) GL_SINGLE_COLOR) { ctx->Light.Model.ColorControl = GL_SINGLE_COLOR; + ctx->TriangleCaps &= ~DD_SEPERATE_SPECULAR; + } else if (params[0] == (GLfloat) GL_SEPARATE_SPECULAR_COLOR) { ctx->Light.Model.ColorControl = GL_SEPARATE_SPECULAR_COLOR; ctx->TriangleCaps |= DD_SEPERATE_SPECULAR; - } else + } + else { gl_error( ctx, GL_INVALID_ENUM, "glLightModel(param)" ); + } + ctx->NewState |= NEW_RASTER_OPS; break; default: gl_error( ctx, GL_INVALID_ENUM, "glLightModel" );