aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/light.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-04-12 09:53:17 +0000
committermarha <marha@users.sourceforge.net>2010-04-12 09:53:17 +0000
commit29b86f9852b2b7ecc31cdfee56679537e40bc6e2 (patch)
tree1e6ec8ccf2dbf773260a1953b8e13c49f9b7c5f5 /mesalib/src/mesa/main/light.c
parent529236591df7366479a6fac30b387667678fd1ba (diff)
downloadvcxsrv-29b86f9852b2b7ecc31cdfee56679537e40bc6e2.tar.gz
vcxsrv-29b86f9852b2b7ecc31cdfee56679537e40bc6e2.tar.bz2
vcxsrv-29b86f9852b2b7ecc31cdfee56679537e40bc6e2.zip
svn merge -r524:HEAD "^/branches/released" .
Diffstat (limited to 'mesalib/src/mesa/main/light.c')
-rw-r--r--mesalib/src/mesa/main/light.c45
1 files changed, 18 insertions, 27 deletions
diff --git a/mesalib/src/mesa/main/light.c b/mesalib/src/mesa/main/light.c
index 654faa5c7..19dc96892 100644
--- a/mesalib/src/mesa/main/light.c
+++ b/mesalib/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);
}
@@ -1433,7 +1424,7 @@ _mesa_free_lighting_data( GLcontext *ctx )
/* Free lighting shininess exponentiation table */
foreach_s( s, tmps, ctx->_ShineTabList ) {
- _mesa_free( s );
+ free( s );
}
- _mesa_free( ctx->_ShineTabList );
+ free( ctx->_ShineTabList );
}