summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/light.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>1999-09-18 20:41:22 +0000
committerKeith Whitwell <[email protected]>1999-09-18 20:41:22 +0000
commit1bf9dfaf5dea61e3d33a69b0a549be54ef6d74df (patch)
treeac7671bdd63c0de5bdc7e60af521b0fc4418238d /src/mesa/main/light.c
parent56b58668e86e6156555e36050df14b49faa14f31 (diff)
Large patch:
- FX bug fixes. - Polygon mode and edgeflag work properly. - Clipping works with edgeflag. - Driver.ReducedPrimitiveChange() callback so drivers that implement lines & points as triangles can turn culling off before rendering groups of these primitives. - Cleaned up feedback & select primitives.
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 cc396f85a50..893438d4457 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) {