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/main/light.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/mesa/main/light.c') diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c index 155792af52b..052c04618bc 100644 --- a/src/mesa/main/light.c +++ b/src/mesa/main/light.c @@ -1,4 +1,4 @@ -/* $Id: light.c,v 1.37 2001/02/15 01:33:52 keithw Exp $ */ +/* $Id: light.c,v 1.38 2001/02/16 18:14:41 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -421,7 +421,14 @@ _mesa_LightModelfv( GLenum pname, const GLfloat *params ) return; FLUSH_VERTICES(ctx, _NEW_LIGHT); ctx->Light.Model.ColorControl = newenum; - ctx->_TriangleCaps ^= DD_SEPERATE_SPECULAR; + + if ((ctx->Light.Enabled && + ctx->Light.Model.ColorControl==GL_SEPARATE_SPECULAR_COLOR) + || ctx->Fog.ColorSumEnabled) + ctx->_TriangleCaps |= DD_SEPERATE_SPECULAR; + else + ctx->_TriangleCaps &= ~DD_SEPERATE_SPECULAR; + break; default: gl_error( ctx, GL_INVALID_ENUM, "glLightModel" ); -- cgit v1.2.3