From dfe508ca7af1a6d1099cd65e257512ed1e17d893 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 13 Oct 2004 15:54:48 +0000 Subject: Fix minor fog / fragment program state bug. Don't add diffuse and specular colors when using fragment program. --- src/mesa/swrast/s_span.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'src/mesa/swrast/s_span.c') diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index c4a86f141c..247c7ee688 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.1 + * Version: 6.3 * * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. * @@ -1473,15 +1473,17 @@ _swrast_write_texture_span( GLcontext *ctx, struct sw_span *span) ASSERT(span->arrayMask & SPAN_RGBA); - /* Add base and specular colors */ - if (ctx->Fog.ColorSumEnabled || - (ctx->Light.Enabled && - ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)) { - if (span->interpMask & SPAN_SPEC) { - interpolate_specular(ctx, span); + if (!ctx->FragmentProgram._Enabled) { + /* Add base and specular colors */ + if (ctx->Fog.ColorSumEnabled || + (ctx->Light.Enabled && + ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)) { + if (span->interpMask & SPAN_SPEC) { + interpolate_specular(ctx, span); + } + ASSERT(span->arrayMask & SPAN_SPEC); + add_colors( span->end, span->array->rgba, span->array->spec ); } - ASSERT(span->arrayMask & SPAN_SPEC); - add_colors( span->end, span->array->rgba, span->array->spec ); } /* Fog */ -- cgit v1.2.3