summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>1999-10-19 20:32:40 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>1999-10-19 20:32:40 +0000
commitf3f9b773244d0c1f5518e07127a7c273d4e3989e (patch)
tree9e95664bac06f47219f85af627f4d9301887ac23 /src
parent351752caff2b151c6ddfc02c2df30ba4176e1224 (diff)
clean-up in gl_LightModelfv()
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/light.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c
index 966b548082..dbbe618e12 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" );