]> git.mxchange.org Git - flightgear.git/commitdiff
Add the posibillity to disable specular highlight because it looks like some implemen...
authorehofman <ehofman>
Fri, 12 Sep 2003 21:43:01 +0000 (21:43 +0000)
committerehofman <ehofman>
Fri, 12 Sep 2003 21:43:01 +0000 (21:43 +0000)
src/Main/main.cxx
src/Main/options.cxx

index ca7f54998719251a50e1eac6e9366259e84880e3..34941f4c17fe77366c7a07c704cdd05caab89499 100644 (file)
@@ -332,7 +332,9 @@ 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);
+
+    if (fgGetBool("/sim/rendering/specular-highlight"))
+        glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR);
 
     ssgGetLight( 0 ) -> setColour( GL_AMBIENT, l->scene_ambient );
 
@@ -610,7 +612,9 @@ 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);
+        if (fgGetBool("/sim/rendering/specular-highlight"))
+            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 );
index 90ad11ad91631d622054b81937d37ac40fef6eaa..6e47f04337dd6666586a48581aed5e7e93c575ca 100644 (file)
@@ -207,6 +207,7 @@ fgSetDefaults ()
     fgSetBool("/sim/rendering/horizon-effect", false);
     fgSetBool("/sim/rendering/enhanced-lighting", false);
     fgSetBool("/sim/rendering/distance-attenuation", false);
+    fgSetBool("/sim/rendering/specular-highlight", true);
     fgSetInt("/sim/startup/xsize", 800);
     fgSetInt("/sim/startup/ysize", 600);
     fgSetInt("/sim/rendering/bits-per-pixel", 16);
@@ -1287,6 +1288,8 @@ struct OptionDesc {
     {"enable-enhanced-lighting",     false, OPTION_BOOL,   "/sim/rendering/enhanced-lighting", true, "", 0 },
     {"disable-distance-attenuation", false, OPTION_BOOL,   "/sim/rendering/distance-attenuation", false, "", 0 },
     {"enable-distance-attenuation",  false, OPTION_BOOL,   "/sim/rendering/distance-attenuation", true, "", 0 },
+    {"disable-specular-highlight",   false, OPTION_BOOL,   "/sim/rendering/specular-highlight", false, "", 0 },
+    {"enable-specular-highlight",    false, OPTION_BOOL,   "/sim/rendering/specular-highlight", true, "", 0 },
     {"disable-clouds",               false, OPTION_BOOL,   "/environment/clouds/status", false, "", 0 },
     {"enable-clouds",                false, OPTION_BOOL,   "/environment/clouds/status", true, "", 0 },
 #ifdef FG_USE_CLOUDS_3D