fix popping of GL_SPOT_DIRECTION (bug 5005)
authorBrian Paul <brian.paul@tungstengraphics.com>
Thu, 10 Nov 2005 16:19:44 +0000 (16:19 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Thu, 10 Nov 2005 16:19:44 +0000 (16:19 +0000)
src/mesa/main/attrib.c

index 6b6247b194a9b84e146155dda76813e6de2f1ca0..47103ccfb56aa1e1267504b618f962df6704e477 100644 (file)
@@ -960,7 +960,7 @@ _mesa_PopAttrib(void)
                  _mesa_Lightfv( lgt, GL_SPECULAR, l->Specular );
                  TRANSFORM_POINT( tmp, ctx->ModelviewMatrixStack.Top->inv, l->EyePosition );
                  _mesa_Lightfv( lgt, GL_POSITION, tmp );
-                 TRANSFORM_POINT( tmp, ctx->ModelviewMatrixStack.Top->m, l->EyeDirection );
+                 TRANSFORM_NORMAL( tmp, l->EyeDirection, ctx->ModelviewMatrixStack.Top->m );
                  _mesa_Lightfv( lgt, GL_SPOT_DIRECTION, tmp );
                  _mesa_Lightfv( lgt, GL_SPOT_EXPONENT, &l->SpotExponent );
                  _mesa_Lightfv( lgt, GL_SPOT_CUTOFF, &l->SpotCutoff );