From 699bc7b73d2fede77d3290f66c1ec355afd0373e Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sun, 29 Oct 2000 18:12:14 +0000 Subject: More GLchan color channel changes. Some header file re-org: Move matrix, vertex buffer structs to types.h to fix #include mess. Remove typedef, extern declarations from config.h --- src/mesa/main/state.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'src/mesa/main/state.c') diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index 149017a4a3..4338462984 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -1,4 +1,4 @@ -/* $Id: state.c,v 1.35 2000/10/27 18:31:23 brianp Exp $ */ +/* $Id: state.c,v 1.36 2000/10/29 18:12:15 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -1107,17 +1107,14 @@ void gl_update_state( GLcontext *ctx ) } ctx->rescale_factor = 1.0F; - if (ctx->ModelView.flags & (MAT_FLAG_UNIFORM_SCALE | MAT_FLAG_GENERAL_SCALE | MAT_FLAG_GENERAL_3D | - MAT_FLAG_GENERAL) ) - - { - GLfloat *m = ctx->ModelView.inv; - GLfloat f = m[2]*m[2] + m[6]*m[6] + m[10]*m[10]; - if (f > 1e-12 && (f-1)*(f-1) > 1e-12) - ctx->rescale_factor = 1.0/GL_SQRT(f); + MAT_FLAG_GENERAL) ) { + const GLfloat *m = ctx->ModelView.inv; + const GLfloat f = m[2] * m[2] + m[6] * m[6] + m[10] * m[10]; + if (f > 1e-12 && (f - 1.0) * (f - 1.0) > 1e-12) + ctx->rescale_factor = 1.0 / GL_SQRT(f); } } -- cgit v1.2.3