From: ehofman Date: Tue, 23 Sep 2003 08:43:19 +0000 (+0000) Subject: Fix a problem where the upper cloud layers are draw X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2764b9181bb6fbbec8d8c1380876db847316f78b;p=flightgear.git Fix a problem where the upper cloud layers are draw n with the sun punch through value --- diff --git a/src/Main/main.cxx b/src/Main/main.cxx index 54c619d28..0056925c2 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -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