summaryrefslogtreecommitdiff
path: root/src/mesa/tnl/t_vb_normals.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2005-06-30 14:22:23 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2005-06-30 14:22:23 +0000
commit049e320f46f3a3daaa36ef67cc680dc504c124d5 (patch)
tree695bdf68ffa2ba7a7341c0d58e0ddbd736e78a13 /src/mesa/tnl/t_vb_normals.c
parentf138b977d09327445a8e9c8126c493c4487c1630 (diff)
Add a set of predicate functions for testing matrices instead of directly
testing the flags field. Move definition of all the MAT_FLAGs into the m_matrix.c file since they're now private.
Diffstat (limited to 'src/mesa/tnl/t_vb_normals.c')
-rw-r--r--src/mesa/tnl/t_vb_normals.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mesa/tnl/t_vb_normals.c b/src/mesa/tnl/t_vb_normals.c
index 9bc6ab4996..7ac33f8bec 100644
--- a/src/mesa/tnl/t_vb_normals.c
+++ b/src/mesa/tnl/t_vb_normals.c
@@ -60,7 +60,7 @@ run_normal_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage)
/* We can only use the display list's saved normal lengths if we've
* got a transformation matrix with uniform scaling.
*/
- if (ctx->ModelviewMatrixStack.Top->flags & MAT_FLAG_GENERAL_SCALE)
+ if (_math_matrix_is_general_scale(ctx->ModelviewMatrixStack.Top))
lengths = NULL;
else
lengths = VB->NormalLengthPtr;
@@ -108,10 +108,7 @@ validate_normal_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage)
*/
GLuint transform = NORM_TRANSFORM_NO_ROT;
- if (ctx->ModelviewMatrixStack.Top->flags & (MAT_FLAG_GENERAL |
- MAT_FLAG_ROTATION |
- MAT_FLAG_GENERAL_3D |
- MAT_FLAG_PERSPECTIVE)) {
+ if (_math_matrix_has_rotation(ctx->ModelviewMatrixStack.Top)) {
/* need to do full (3x3) matrix transform */
transform = NORM_TRANSFORM;
}