From 46b0988c673b28e072fd0cbf477632a9ab6f9f18 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Fri, 16 Feb 2001 18:14:41 +0000 Subject: 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. --- src/mesa/swrast_setup/ss_context.c | 14 ++------------ src/mesa/swrast_setup/ss_vbtmp.h | 8 ++++++++ 2 files changed, 10 insertions(+), 12 deletions(-) (limited to 'src/mesa/swrast_setup') diff --git a/src/mesa/swrast_setup/ss_context.c b/src/mesa/swrast_setup/ss_context.c index 181be13f94..b15d7d9803 100644 --- a/src/mesa/swrast_setup/ss_context.c +++ b/src/mesa/swrast_setup/ss_context.c @@ -1,4 +1,4 @@ -/* $Id: ss_context.c,v 1.10 2001/02/16 00:35:35 keithw Exp $ */ +/* $Id: ss_context.c,v 1.11 2001/02/16 18:14:41 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -152,17 +152,7 @@ _swsetup_RenderStart( GLcontext *ctx ) if (VB->ClipMask && VB->importable_data) VB->import_data( ctx, VB->importable_data, - VEC_NOT_WRITEABLE|VEC_BAD_STRIDE); - - /* Ugly hack: Tie up some dangling pointers for flat/twoside code - * in ss_tritmp.h and ss_interptmp.h - */ - if ((ctx->_TriangleCaps & DD_SEPERATE_SPECULAR) == 0 || - ctx->Texture._ReallyEnabled == 0) { - VB->SecondaryColorPtr[0] = VB->ColorPtr[0]; - VB->SecondaryColorPtr[1] = VB->ColorPtr[1]; - } - + VEC_NOT_WRITEABLE|VEC_BAD_STRIDE); } void diff --git a/src/mesa/swrast_setup/ss_vbtmp.h b/src/mesa/swrast_setup/ss_vbtmp.h index ab5417ffe5..6197f5bdb5 100644 --- a/src/mesa/swrast_setup/ss_vbtmp.h +++ b/src/mesa/swrast_setup/ss_vbtmp.h @@ -78,6 +78,14 @@ static void TAG(rs)(GLcontext *ctx, GLuint start, GLuint end, GLuint newinputs ) } } + /* Tie up some dangling pointers for flat/twoside code in ss_tritmp.h + */ + if ((ctx->_TriangleCaps & DD_SEPERATE_SPECULAR) == 0) { + VB->SecondaryColorPtr[0] = VB->ColorPtr[0]; + VB->SecondaryColorPtr[1] = VB->ColorPtr[1]; + } + + proj = VB->ProjectedClipPtr->data; if (IND & FOG) fog = VB->FogCoordPtr->data; -- cgit v1.2.3