summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/enable.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2000-11-27 18:59:09 +0000
committerBrian Paul <[email protected]>2000-11-27 18:59:09 +0000
commit72ef753d5c8eedc3375af77da083cf93447a73a3 (patch)
treeec392ed0f960cc9814922ffdc2ac3f9856ac0581 /src/mesa/main/enable.c
parent297dfa0fbf38a415d70caaab29d93dad585df1d2 (diff)
Set ENABLE_LIGHT according to ctx->Light.Enabled whether or not
individual light sources are enabled.
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r--src/mesa/main/enable.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index d2ad97a0da8..2de320d3868 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -1,4 +1,4 @@
-/* $Id: enable.c,v 1.34 2000/11/24 10:25:05 keithw Exp $ */
+/* $Id: enable.c,v 1.35 2000/11/27 18:59:09 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -181,18 +181,13 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
case GL_LIGHT7:
if (ctx->Light.Light[cap-GL_LIGHT0].Enabled != state) {
ctx->Light.Light[cap-GL_LIGHT0].Enabled = state;
-
if (state) {
insert_at_tail(&ctx->Light.EnabledList,
&ctx->Light.Light[cap-GL_LIGHT0]);
- if (ctx->Light.Enabled)
- ctx->_Enabled |= ENABLE_LIGHT;
- } else {
+ }
+ else {
remove_from_list(&ctx->Light.Light[cap-GL_LIGHT0]);
- if (is_empty_list(&ctx->Light.EnabledList))
- ctx->_Enabled &= ~ENABLE_LIGHT;
}
-
ctx->NewState |= _NEW_LIGHT;
}
break;