diff options
author | Brian <[email protected]> | 2007-04-21 15:58:37 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-04-21 15:58:37 -0600 |
commit | f793e90e823a58c0408771c38f3a6209f78a3617 (patch) | |
tree | cc9d8a0d7f005cd6b17a4dedeafca973f0a08e38 /src/mesa/swrast/s_span.c | |
parent | 112e1f2b5ab86626eb9b3de9075e9f165a397e7b (diff) |
Fix color sum bug 10688.
Diffstat (limited to 'src/mesa/swrast/s_span.c')
-rw-r--r-- | src/mesa/swrast/s_span.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index f3b79986186..0b17791567a 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -130,10 +130,15 @@ _swrast_span_default_color( GLcontext *ctx, SWspan *span ) } +/** + * Set the span's secondary color info to the current raster position's + * secondary color, when needed (lighting enabled or colorsum enabled). + */ void _swrast_span_default_secondary_color(GLcontext *ctx, SWspan *span) { - if (ctx->Visual.rgbMode) { + if (ctx->Visual.rgbMode && (ctx->Light.Enabled || ctx->Fog.ColorSumEnabled)) + { GLchan r, g, b, a; UNCLAMPED_FLOAT_TO_CHAN(r, ctx->Current.RasterSecondaryColor[0]); UNCLAMPED_FLOAT_TO_CHAN(g, ctx->Current.RasterSecondaryColor[1]); |