summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_aatriangle.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2001-02-16 18:14:41 +0000
committerKeith Whitwell <[email protected]>2001-02-16 18:14:41 +0000
commit46b0988c673b28e072fd0cbf477632a9ab6f9f18 (patch)
tree3463116da957c6f13dcb0b415ca8476640503fc7 /src/mesa/swrast/s_aatriangle.c
parent2448fc7deeaa870d879de17158f243f239c05b15 (diff)
Allow swrast to cope (fairly) cleanly with GL_SEPERATE_SPECULAR when
texturing is not enabled, and without requiring the two colors be added externally. As a part of this, collapsed the decomposition of quads into triangles inside swrast to be hardwired into _swrast_Quad; removed s_quads.[ch]. Removed checks on texture state from t_vb_light.c, which was previously required by swrast. Moved the t_dd_ templates to a new directory.
Diffstat (limited to 'src/mesa/swrast/s_aatriangle.c')
-rw-r--r--src/mesa/swrast/s_aatriangle.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/mesa/swrast/s_aatriangle.c b/src/mesa/swrast/s_aatriangle.c
index 219798d8c9e..d9a11b0cf66 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.6 2001/01/23 23:39:37 brianp Exp $ */
+/* $Id: s_aatriangle.c,v 1.7 2001/02/16 18:14:41 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -405,9 +405,7 @@ _mesa_set_aa_triangle_function(GLcontext *ctx)
ASSERT(ctx->Polygon.SmoothFlag);
if (ctx->Texture._ReallyEnabled) {
- if (ctx->Light.Enabled &&
- (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR ||
- ctx->Fog.ColorSumEnabled)) {
+ if (ctx->_TriangleCaps & DD_SEPERATE_SPECULAR) {
if (swrast->_MultiTextureEnabled) {
SWRAST_CONTEXT(ctx)->Triangle = spec_multitex_aa_tri;
}
@@ -424,13 +422,12 @@ _mesa_set_aa_triangle_function(GLcontext *ctx)
}
}
}
+ else if (ctx->Visual.rgbMode) {
+ SWRAST_CONTEXT(ctx)->Triangle = rgba_aa_tri;
+ }
else {
- if (ctx->Visual.rgbMode) {
- SWRAST_CONTEXT(ctx)->Triangle = rgba_aa_tri;
- }
- else {
- SWRAST_CONTEXT(ctx)->Triangle = index_aa_tri;
- }
+ SWRAST_CONTEXT(ctx)->Triangle = index_aa_tri;
}
+
ASSERT(SWRAST_CONTEXT(ctx)->Triangle);
}