diff options
author | Eric Anholt <[email protected]> | 2005-10-26 10:46:49 +0000 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2005-10-26 10:46:49 +0000 |
commit | 5f79025e0d3a416dd8428f75612da93283775778 (patch) | |
tree | 4fc3b7f02f615be9603c86ba51aafd60bca8b1b8 /src/mesa/drivers/dri/r128/r128_state.c | |
parent | f8a5898ca025ef48510d67f00f56fe4b2b7ef64d (diff) |
Fix the RGB order of the specular color emit, and turn GL_EXT_secondary_color
back on. Tested using seccolor modified to use the blue channel instead of
green, since green stays in the same place across RGB/BGR mistakes. Also hook
in UpdateSpecular on COLOR_EXT change, which might have resulted in missing
statechanges before.
Diffstat (limited to 'src/mesa/drivers/dri/r128/r128_state.c')
-rw-r--r-- | src/mesa/drivers/dri/r128/r128_state.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/mesa/drivers/dri/r128/r128_state.c b/src/mesa/drivers/dri/r128/r128_state.c index 7da3a081904..f6c6504566b 100644 --- a/src/mesa/drivers/dri/r128/r128_state.c +++ b/src/mesa/drivers/dri/r128/r128_state.c @@ -545,34 +545,20 @@ static void updateSpecularLighting( GLcontext *ctx ) r128ContextPtr rmesa = R128_CONTEXT(ctx); GLuint t = rmesa->setup.tex_cntl_c; - if ( ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR && - ctx->Light.Enabled) { - /* XXX separate specular color just doesn't seem to work as it should. - * For now, we fall back to s/w rendering whenever separate specular - * is enabled. - */ -#if 0 + if ( NEED_SECONDARY_COLOR( ctx ) ) { if (ctx->Light.ShadeModel == GL_FLAT) { /* R128 can't do flat-shaded separate specular */ t &= ~R128_SPEC_LIGHT_ENABLE; FALLBACK( rmesa, R128_FALLBACK_SEP_SPECULAR, GL_TRUE ); - /*printf("%s fallback sep spec\n", __FUNCTION__);*/ } else { t |= R128_SPEC_LIGHT_ENABLE; FALLBACK( rmesa, R128_FALLBACK_SEP_SPECULAR, GL_FALSE ); - /*printf("%s enable sep spec\n", __FUNCTION__);*/ } -#else - t &= ~R128_SPEC_LIGHT_ENABLE; - FALLBACK( rmesa, R128_FALLBACK_SEP_SPECULAR, GL_TRUE ); - /*printf("%s fallback sep spec\n", __FUNCTION__);*/ -#endif } else { t &= ~R128_SPEC_LIGHT_ENABLE; FALLBACK( rmesa, R128_FALLBACK_SEP_SPECULAR, GL_FALSE ); - /*printf("%s disable sep spec\n", __FUNCTION__);*/ } if ( rmesa->setup.tex_cntl_c != t ) { @@ -855,6 +841,7 @@ static void r128DDEnable( GLcontext *ctx, GLenum cap, GLboolean state ) break; case GL_LIGHTING: + case GL_COLOR_SUM_EXT: updateSpecularLighting(ctx); break; |