summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2001-05-17 09:32:17 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2001-05-17 09:32:17 +0000
commit89dae684aa1d74b06a4f70cb76b33671d0cef9e6 (patch)
tree9b42d5eb082a5f37920af04048cd6b8a7f20749c /src/mesa
parent47cf442c1164b6b406117fccfb8b564602741ee3 (diff)
Fix order of decomposition of quad.
Remove 'swrast->_MultiTexEnabled' derived value.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/swrast/s_aaline.c8
-rw-r--r--src/mesa/swrast/s_aatriangle.c6
-rw-r--r--src/mesa/swrast/s_context.c10
-rw-r--r--src/mesa/swrast/s_context.h3
-rw-r--r--src/mesa/swrast/s_lines.c4
-rw-r--r--src/mesa/swrast/s_pointtemp.h6
-rw-r--r--src/mesa/swrast/s_triangle.c4
7 files changed, 18 insertions, 23 deletions
diff --git a/src/mesa/swrast/s_aaline.c b/src/mesa/swrast/s_aaline.c
index 7ce0d6b708..34a026e1e7 100644
--- a/src/mesa/swrast/s_aaline.c
+++ b/src/mesa/swrast/s_aaline.c
@@ -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
diff --git a/src/mesa/swrast/s_aatriangle.c b/src/mesa/swrast/s_aatriangle.c
index 5b8cdbf6a4..13f03fdecc 100644
--- a/src/mesa/swrast/s_aatriangle.c
+++ b/src/mesa/swrast/s_aatriangle.c
@@ -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 {
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c
index d994e60029..69e0660970 100644
--- a/src/mesa/swrast/s_context.c
+++ b/src/mesa/swrast/s_context.c
@@ -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
diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h
index 25a16f28b8..03f6961001 100644
--- a/src/mesa/swrast/s_context.h
+++ b/src/mesa/swrast/s_context.h
@@ -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;
diff --git a/src/mesa/swrast/s_lines.c b/src/mesa/swrast/s_lines.c
index eec354b84a..19b0d9a1a4 100644
--- a/src/mesa/swrast/s_lines.c
+++ b/src/mesa/swrast/s_lines.c
@@ -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)
diff --git a/src/mesa/swrast/s_pointtemp.h b/src/mesa/swrast/s_pointtemp.h
index 9711238937..be20c6bfa9 100644
--- a/src/mesa/swrast/s_pointtemp.h
+++ b/src/mesa/swrast/s_pointtemp.h
@@ -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 );
}
diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c
index 2c117b869c..1063d316e7 100644
--- a/src/mesa/swrast/s_triangle.c
+++ b/src/mesa/swrast/s_triangle.c
@@ -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) {