Fix order of decomposition of quad.
authorKeith Whitwell <keith@tungstengraphics.com>
Thu, 17 May 2001 09:32:17 +0000 (09:32 +0000)
committerKeith Whitwell <keith@tungstengraphics.com>
Thu, 17 May 2001 09:32:17 +0000 (09:32 +0000)
Remove 'swrast->_MultiTexEnabled' derived value.

src/mesa/swrast/s_aaline.c
src/mesa/swrast/s_aatriangle.c
src/mesa/swrast/s_context.c
src/mesa/swrast/s_context.h
src/mesa/swrast/s_lines.c
src/mesa/swrast/s_pointtemp.h
src/mesa/swrast/s_triangle.c

index 7ce0d6b..34a026e 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: s_aaline.c,v 1.9 2001/05/10 17:41:41 brianp Exp $ */
+/* $Id: s_aaline.c,v 1.10 2001/05/17 09:32:17 keithw Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -503,9 +503,9 @@ _swrast_choose_aa_line_function(GLcontext *ctx)
    if (ctx->Visual.rgbMode) {
       /* RGBA */
       if (ctx->Texture._ReallyEnabled) {
-         if (swrast->_MultiTextureEnabled
-             || ctx->Light.Model.ColorControl==GL_SEPARATE_SPECULAR_COLOR
-             || ctx->Fog.ColorSumEnabled)
+         if (ctx->Texture._ReallyEnabled > TEXTURE0_ANY || 
+            ctx->Light.Model.ColorControl==GL_SEPARATE_SPECULAR_COLOR || 
+            ctx->Fog.ColorSumEnabled)
             /* Multitextured! */
             swrast->Line = aa_multitex_rgba_line;
          else
index 5b8cdbf..13f03fd 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: s_aatriangle.c,v 1.16 2001/05/16 20:27:12 brianp Exp $ */
+/* $Id: s_aatriangle.c,v 1.17 2001/05/17 09:32:17 keithw Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -420,7 +420,7 @@ _mesa_set_aa_triangle_function(GLcontext *ctx)
 
    if (ctx->Texture._ReallyEnabled) {
       if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) {
-         if (swrast->_MultiTextureEnabled) {
+         if (ctx->Texture._ReallyEnabled > TEXTURE0_ANY) {
             SWRAST_CONTEXT(ctx)->Triangle = spec_multitex_aa_tri;
          }
          else {
@@ -428,7 +428,7 @@ _mesa_set_aa_triangle_function(GLcontext *ctx)
          }
       }
       else {
-         if (swrast->_MultiTextureEnabled) {
+         if (ctx->Texture._ReallyEnabled > TEXTURE0_ANY) {
             SWRAST_CONTEXT(ctx)->Triangle = multitex_aa_tri;
          }
          else {
index d994e60..69e0660 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: s_context.c,v 1.20 2001/03/29 17:08:27 keithw Exp $ */
+/* $Id: s_context.c,v 1.21 2001/05/17 09:32:17 keithw Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -351,10 +351,6 @@ _swrast_validate_derived( GLcontext *ctx )
       if (swrast->NewState & _SWRAST_NEW_RASTERMASK)
         _swrast_update_rasterflags( ctx );
 
-      if (swrast->NewState & _NEW_TEXTURE)
-        swrast->_MultiTextureEnabled =
-            ctx->Texture._ReallyEnabled > TEXTURE0_ANY;
-
       if (swrast->NewState & _NEW_POLYGON)
         _swrast_update_polygon( ctx );
 
@@ -383,8 +379,8 @@ _swrast_Quad( GLcontext *ctx,
       _swrast_print_vertex( ctx, v2 );
       _swrast_print_vertex( ctx, v3 );
    }
-   SWRAST_CONTEXT(ctx)->Triangle( ctx, v0, v1, v2 );
-   SWRAST_CONTEXT(ctx)->Triangle( ctx, v0, v2, v3 );
+   SWRAST_CONTEXT(ctx)->Triangle( ctx, v0, v1, v3 );
+   SWRAST_CONTEXT(ctx)->Triangle( ctx, v1, v2, v3 );
 }
 
 void
index 25a16f2..03f6961 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: s_context.h,v 1.9 2001/03/29 16:50:32 brianp Exp $ */
+/* $Id: s_context.h,v 1.10 2001/05/17 09:32:17 keithw Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -114,7 +114,6 @@ typedef struct
     * _swrast_validate_derived():
     */
    GLuint _RasterMask;
-   GLboolean _MultiTextureEnabled;
    GLfloat _MinMagThresh[MAX_TEXTURE_UNITS];
    GLfloat _backface_sign;
    GLboolean _PreferPixelFog;
index eec354b..19b0d9a 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: s_lines.c,v 1.16 2001/05/03 22:13:32 brianp Exp $ */
+/* $Id: s_lines.c,v 1.17 2001/05/17 09:32:17 keithw Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -1018,7 +1018,7 @@ _swrast_choose_line( GLcontext *ctx )
          ASSERT(swrast->Triangle);
       }
       else if (ctx->Texture._ReallyEnabled) {
-         if (swrast->_MultiTextureEnabled ||
+         if (ctx->Texture._ReallyEnabled > TEXTURE0_ANY ||          
             (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR)) {
             /* multi-texture and/or separate specular color */
             if (ctx->Light.ShadeModel==GL_SMOOTH)
index 9711238..be20c6b 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: s_pointtemp.h,v 1.7 2001/05/15 21:30:27 brianp Exp $ */
+/* $Id: s_pointtemp.h,v 1.8 2001/05/17 09:32:17 keithw Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -245,7 +245,7 @@ NAME ( GLcontext *ctx, const SWvertex *vert )
                                             sRed, sGreen, sBlue,
                                             texcoord);
 #elif FLAGS & TEXTURE
-              if (swrast->_MultiTextureEnabled) {
+              if (ctx->Texture._ReallyEnabled > TEXTURE0_ANY) {
                  PB_WRITE_MULTITEX_PIXEL(PB, x, y, z, vert->fog,
                                          red, green, blue, alpha,
                                          texcoord);
@@ -292,7 +292,7 @@ NAME ( GLcontext *ctx, const SWvertex *vert )
                                    sRed, sGreen, sBlue,
                                    texcoord);
 #elif FLAGS & TEXTURE
-      if (swrast->_MultiTextureEnabled) {
+      if (ctx->Texture._ReallyEnabled > TEXTURE0_ANY) {
          PB_WRITE_MULTITEX_PIXEL(PB, x, y, z, vert->fog,
                                  red, green, blue, alpha, texcoord );
       }
index 2c117b8..1063d31 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: s_triangle.c,v 1.28 2001/05/16 20:27:12 brianp Exp $ */
+/* $Id: s_triangle.c,v 1.29 2001/05/17 09:32:17 keithw Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -2377,7 +2377,7 @@ _swrast_choose_triangle( GLcontext *ctx )
                needLambda = GL_TRUE;
             else
                needLambda = GL_FALSE;
-            if (swrast->_MultiTextureEnabled) {
+            if (ctx->Texture._ReallyEnabled > TEXTURE0_ANY) {
                USE(lambda_multitextured_triangle);
             }
             else if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) {