]> git.mxchange.org Git - flightgear.git/commitdiff
Patch to position 3d clouds at center of <current> tile. This means the clouds
authorcurt <curt>
Fri, 20 Sep 2002 15:30:54 +0000 (15:30 +0000)
committercurt <curt>
Fri, 20 Sep 2002 15:30:54 +0000 (15:30 +0000)
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

index 8dbc7d6770a529418d41302cd6f7c1f83adcc6bb..0ff156bdf7031ff0c2228243552876253b2c223b 100644 (file)
@@ -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 );