From ab49022465191cad10d49d91e36286be6e085741 Mon Sep 17 00:00:00 2001 From: curt Date: Fri, 20 Sep 2002 15:30:54 +0000 Subject: [PATCH] Patch to position 3d clouds at center of tile. This means the clouds jump whenever you cross a tile, but there are currently a lot of other positioning problems as well, so this doesn't really detract too much and means you can play with 3d clouds from just about any starting point. --- src/Main/main.cxx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Main/main.cxx b/src/Main/main.cxx index 8dbc7d677..0ff156bdf 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -501,10 +501,11 @@ void fgRenderFrame() { glEnable(GL_BLEND); glBlendFunc( GL_ONE, GL_ONE_MINUS_SRC_ALPHA ) ; posit = globals->get_scenery()->get_center(); - if ( _bcloud_orig ) { - sgClouds3d->Set_Cloud_Orig( _posit ); - _bcloud_orig = false; - } + // if ( _bcloud_orig ) { + // sgClouds3d->Set_Cloud_Orig( _posit ); + // _bcloud_orig = false; + // } + sgClouds3d->Set_Cloud_Orig(&(globals->get_scenery()->get_center())); sgClouds3d->Update( current__view->get_absolute_view_pos() ); } @@ -776,9 +777,6 @@ void fgRenderFrame() { } } - globals->get_model_mgr()->draw(); - globals->get_aircraft_model()->draw(); - if ( fgGetBool("/sim/rendering/clouds3d") ) { glDisable( GL_FOG ); glEnable(GL_BLEND); @@ -793,6 +791,9 @@ void fgRenderFrame() { sgClouds3d->Draw((sgVec4 *)current__view->get_VIEW()); } + globals->get_model_mgr()->draw(); + globals->get_aircraft_model()->draw(); + // display HUD && Panel glDisable( GL_FOG ); glDisable( GL_DEPTH_TEST ); -- 2.39.5