From 774faa157dbc18a605705fa374c699b3bb412d3f Mon Sep 17 00:00:00 2001 From: ehofman Date: Fri, 12 Sep 2003 09:27:19 +0000 Subject: [PATCH] Make it possible for textured object to change color to white when lit by a strong light source. This might affect rendering time a bit --- src/Main/main.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Main/main.cxx b/src/Main/main.cxx index a4675a8ae..ca7f54998 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -332,6 +332,7 @@ void trRenderFrame( void ) { // explicitely to black. glLightModelfv( GL_LIGHT_MODEL_AMBIENT, black ); glLightModeli( GL_LIGHT_MODEL_LOCAL_VIEWER, GL_FALSE ); + glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR); ssgGetLight( 0 ) -> setColour( GL_AMBIENT, l->scene_ambient ); @@ -609,6 +610,7 @@ void fgRenderFrame() { // a completely dark scene. So, we set GL_LIGHT_MODEL_AMBIENT // explicitely to black. glLightModelfv( GL_LIGHT_MODEL_AMBIENT, black ); + glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR); ssgGetLight( 0 ) -> setColour( GL_AMBIENT, l->scene_ambient ); ssgGetLight( 0 ) -> setColour( GL_DIFFUSE, l->scene_diffuse );