1
0
Fork 0

Fix a problem where the upper cloud layers are draw

n with the sun punch through value
This commit is contained in:
ehofman 2003-09-23 08:43:19 +00:00
parent b61c3fa11c
commit 2764b9181b

View 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