diff options
author | Ian Romanick <[email protected]> | 2010-02-24 18:58:38 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2010-03-03 12:37:04 -0800 |
commit | 22a96f305898b5d1aa26809c7156a01686eb9bf0 (patch) | |
tree | a6a863d1bd28f639f92467364d4d4687f4367413 /src/mesa/main/light.c | |
parent | fcf438e9e03f6e75bca4a49ad372fe7c4b1abbf8 (diff) |
mesa: Remove checks of Visual.rgbMode
This must always be true now, so there is no reason to check it. Ever.
Signed-off-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/light.c')
-rw-r--r-- | src/mesa/main/light.c | 41 |
1 files changed, 16 insertions, 25 deletions
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c index 6899ed0ddf3..19dc96892d2 100644 --- a/src/mesa/main/light.c +++ b/src/mesa/main/light.c @@ -1093,31 +1093,22 @@ _mesa_update_lighting( GLcontext *ctx ) * FLUSH_UPDATE_CURRENT, as when any outstanding material changes * are flushed, they will update the derived state at that time. */ - if (ctx->Visual.rgbMode) { - if (ctx->Light.Model.TwoSide) - _mesa_update_material( ctx, - MAT_BIT_FRONT_EMISSION | - MAT_BIT_FRONT_AMBIENT | - MAT_BIT_FRONT_DIFFUSE | - MAT_BIT_FRONT_SPECULAR | - MAT_BIT_BACK_EMISSION | - MAT_BIT_BACK_AMBIENT | - MAT_BIT_BACK_DIFFUSE | - MAT_BIT_BACK_SPECULAR); - else - _mesa_update_material( ctx, - MAT_BIT_FRONT_EMISSION | - MAT_BIT_FRONT_AMBIENT | - MAT_BIT_FRONT_DIFFUSE | - MAT_BIT_FRONT_SPECULAR); - } - else { - static const GLfloat ci[3] = { .30F, .59F, .11F }; - foreach(light, &ctx->Light.EnabledList) { - light->_dli = DOT3(ci, light->Diffuse); - light->_sli = DOT3(ci, light->Specular); - } - } + if (ctx->Light.Model.TwoSide) + _mesa_update_material(ctx, + MAT_BIT_FRONT_EMISSION | + MAT_BIT_FRONT_AMBIENT | + MAT_BIT_FRONT_DIFFUSE | + MAT_BIT_FRONT_SPECULAR | + MAT_BIT_BACK_EMISSION | + MAT_BIT_BACK_AMBIENT | + MAT_BIT_BACK_DIFFUSE | + MAT_BIT_BACK_SPECULAR); + else + _mesa_update_material(ctx, + MAT_BIT_FRONT_EMISSION | + MAT_BIT_FRONT_AMBIENT | + MAT_BIT_FRONT_DIFFUSE | + MAT_BIT_FRONT_SPECULAR); } |