]> git.mxchange.org Git - flightgear.git/commitdiff
Make it possible for textured object to change color to white when lit by a strong...
authorehofman <ehofman>
Fri, 12 Sep 2003 09:27:19 +0000 (09:27 +0000)
committerehofman <ehofman>
Fri, 12 Sep 2003 09:27:19 +0000 (09:27 +0000)
src/Main/main.cxx

index a4675a8ae0660aaff9fa0216e24e0d9e50a928b5..ca7f54998719251a50e1eac6e9366259e84880e3 100644 (file)
@@ -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 );