summaryrefslogtreecommitdiff
path: root/src/mesa/main/light.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/light.c')
-rw-r--r--src/mesa/main/light.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c
index cc396f85a5..893438d445 100644
--- a/src/mesa/main/light.c
+++ b/src/mesa/main/light.c
@@ -1,4 +1,4 @@
-/* $Id: light.c,v 1.1 1999/08/19 00:55:41 jtg Exp $ */
+/* $Id: light.c,v 1.2 1999/09/18 20:41:23 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -60,17 +60,18 @@ void gl_ShadeModel( GLcontext *ctx, GLenum mode )
if (MESA_VERBOSE & VERBOSE_API)
fprintf(stderr, "glShadeModel %s\n", gl_lookup_enum_by_nr(mode));
+
switch (mode) {
- case GL_FLAT:
- case GL_SMOOTH:
- if (ctx->Light.ShadeModel!=mode) {
- ctx->Light.ShadeModel = mode;
- ctx->TriangleCaps ^= DD_FLATSHADE;
- ctx->NewState |= NEW_RASTER_OPS;
- }
- break;
- default:
- gl_error( ctx, GL_INVALID_ENUM, "glShadeModel" );
+ case GL_FLAT:
+ case GL_SMOOTH:
+ if (ctx->Light.ShadeModel!=mode) {
+ ctx->Light.ShadeModel = mode;
+ ctx->TriangleCaps ^= DD_FLATSHADE;
+ ctx->NewState |= NEW_RASTER_OPS;
+ }
+ break;
+ default:
+ gl_error( ctx, GL_INVALID_ENUM, "glShadeModel" );
}
if (ctx->Driver.ShadeModel)
@@ -314,6 +315,7 @@ void gl_LightModelfv( GLcontext *ctx, GLenum pname, const GLfloat *params )
break;
case GL_LIGHT_MODEL_COLOR_CONTROL:
ctx->TriangleCaps &= ~DD_SEPERATE_SPECULAR;
+ ctx->NewState |= NEW_RASTER_OPS;
if (params[0] == (GLfloat) GL_SINGLE_COLOR)
ctx->Light.Model.ColorControl = GL_SINGLE_COLOR;
else if (params[0] == (GLfloat) GL_SEPARATE_SPECULAR_COLOR) {