summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_span.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2004-10-13 15:54:48 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2004-10-13 15:54:48 +0000
commitdfe508ca7af1a6d1099cd65e257512ed1e17d893 (patch)
tree1393d22cefdabb68c1b35bb24c108edd76b8abf9 /src/mesa/swrast/s_span.c
parent886df0926fe6b3d8f82cff62747abfdb95540aa0 (diff)
Fix minor fog / fragment program state bug.
Don't add diffuse and specular colors when using fragment program.
Diffstat (limited to 'src/mesa/swrast/s_span.c')
-rw-r--r--src/mesa/swrast/s_span.c20
1 files changed, 11 insertions, 9 deletions
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 */