summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-06-26 23:38:18 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-06-26 23:38:18 +0000
commitfd3df4b0f78d7e72aeac6c99c3691d45378cff25 (patch)
tree900c144af2182024b200eb16c7b29a7db24802ad
parentde82d063d4dfaaec06d01a51b1a5b811c61712aa (diff)
disabled some ctx->NeedEyeCoords shortcuts
-rw-r--r--src/mesa/main/state.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 64d833a76b..0b7903824c 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -1,4 +1,4 @@
-/* $Id: state.c,v 1.18 2000/06/24 11:57:35 keithw Exp $ */
+/* $Id: state.c,v 1.19 2000/06/26 23:38:18 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -1179,14 +1179,9 @@ void gl_update_state( GLcontext *ctx )
ctx->NeedEyeNormals = GL_FALSE;
if (ctx->Light.Enabled) {
- if (ctx->Light.Flags & LIGHT_POSITIONAL) {
- /* Need length for attenuation */
- if (!TEST_MAT_FLAGS( &ctx->ModelView, MAT_FLAGS_LENGTH_PRESERVING))
- ctx->NeedEyeCoords = GL_TRUE;
- } else if (ctx->Light.NeedVertices) {
- /* Need angle for spot calculations */
- if (!TEST_MAT_FLAGS( &ctx->ModelView, MAT_FLAGS_ANGLE_PRESERVING))
- ctx->NeedEyeCoords = GL_TRUE;
+ if ((ctx->Light.Flags & LIGHT_POSITIONAL) || ctx->Light.NeedVertices){
+ /* Need length for attenuation or need angle for spotlights */
+ ctx->NeedEyeCoords = GL_TRUE;
}
ctx->NeedEyeNormals = ctx->NeedEyeCoords;
}