]> git.mxchange.org Git - flightgear.git/commitdiff
Fix a problem where the upper cloud layers are draw
authorehofman <ehofman>
Tue, 23 Sep 2003 08:43:19 +0000 (08:43 +0000)
committerehofman <ehofman>
Tue, 23 Sep 2003 08:43:19 +0000 (08:43 +0000)
n with the sun punch through value

src/Main/main.cxx

index 54c619d28f55fd61e110f8a1260ff9cb0974b790..0056925c2dc3eb28fdb3c76ce5f2dd1c1228cd48 100644 (file)
@@ -340,7 +340,7 @@ void trRenderFrame( void ) {
 
     // we need a white diffuse light for the phase of the moon
     ssgGetLight( 0 ) -> setColour( GL_DIFFUSE, white );
-    thesky->preDraw( cur_fdm_state->get_Altitude() * SG_FEET_TO_METER );
+    thesky->preDraw( cur_fdm_state->get_Altitude() * SG_FEET_TO_METER, fog_exp2_density );
 
     // draw the ssg scene
     // return to the desired diffuse color
@@ -676,16 +676,10 @@ void fgRenderFrame() {
             // we need a white diffuse light for the phase of the moon
             ssgGetLight( 0 ) -> setColour( GL_DIFFUSE, white );
 
-            thesky->preDraw( cur_fdm_state->get_Altitude() * SG_FEET_TO_METER );
+            thesky->preDraw( cur_fdm_state->get_Altitude() * SG_FEET_TO_METER, fog_exp2_density );
 
             // return to the desired diffuse color
             ssgGetLight( 0 ) -> setColour( GL_DIFFUSE, l->scene_diffuse() );
-
-            // FIXME: This should not be needed, but at this time (08/15/2003)
-            //        certain NVidia drivers don't seem to implement
-            //        fgPushAttrib(FG_FOG_BIT) properly. The result is that
-            //        there is not fog when looking at the sun.
-            glFogf ( GL_FOG_DENSITY, fog_exp2_density );
         }
 
         // draw the ssg scene