]> git.mxchange.org Git - flightgear.git/commitdiff
iFrederic Bouvier: Postpone rendering the scene until the scenery is loaded. This...
authorehofman <ehofman>
Sun, 15 Aug 2004 11:25:15 +0000 (11:25 +0000)
committerehofman <ehofman>
Sun, 15 Aug 2004 11:25:15 +0000 (11:25 +0000)
src/Main/main.cxx

index 2bb717155b8e0b62faf3bab81cd397f7b16ae1a5..57d58828a9422fa55d69684799d0ca6a17328c23 100644 (file)
@@ -380,6 +380,7 @@ void trRenderFrame( void ) {
 
 // Update all Visuals (redraws anything graphics related)
 void fgRenderFrame() {
+    bool scenery_loaded = fgGetBool("sim/sceneryloaded") || fgGetBool("sim/sceneryloaded-override");
     bool draw_otw = fgGetBool("/sim/rendering/draw-otw");
     bool skyblend = fgGetBool("/sim/rendering/skyblend");
     bool enhanced_lighting = fgGetBool("/sim/rendering/enhanced-lighting");
@@ -435,7 +436,7 @@ void fgRenderFrame() {
     // GLfloat mat_shininess[] = { 10.0 };
     GLbitfield clear_mask;
 
-    if ( idle_state != 1000 ) {
+    if ( idle_state != 1000 || !scenery_loaded ) {
         // still initializing, draw the splash screen
         if ( fgGetBool("/sim/startup/splash-screen") ) {
             fgSplashUpdate(0.0, 1.0);
@@ -1205,16 +1206,14 @@ static void fgMainLoop( void ) {
         remainder = 0;
     }
 
+    bool scenery_loaded = fgGetBool("sim/sceneryloaded") || fgGetBool("sim/sceneryloaded-override");
+
     // flight model
     if ( global_multi_loop > 0) {
         // first run the flight model each frame until it is intialized
         // then continue running each frame only after initial scenery load is complete.
-        if (!cur_fdm_state->get_inited() || fgGetBool("sim/sceneryloaded")) {
+        if (!cur_fdm_state->get_inited() || scenery_loaded) {
             fgUpdateTimeDepCalcs();
-        } else {
-            // only during scenery load
-            NewGUI * gui = (NewGUI *)globals->get_subsystem("gui");
-            gui->showDialog("scenery_loading");
         }
     } else {
         SG_LOG( SG_ALL, SG_DEBUG, 
@@ -1339,11 +1338,8 @@ static void fgMainLoop( void ) {
 
     // END Tile Manager udpates
 
-    if (!fgGetBool("sim/sceneryloaded") && globals->get_tile_mgr()->all_queues_empty() && cur_fdm_state->get_inited()) {
+    if (!scenery_loaded && globals->get_tile_mgr()->all_queues_empty() && cur_fdm_state->get_inited()) {
         fgSetBool("sim/sceneryloaded",true);
-        // probably not efficient way to popup msg,  but is done only during scenery load
-        NewGUI * gui = (NewGUI *)globals->get_subsystem("gui");
-        gui->closeDialog("scenery_loading");
     }
 
     if (fgGetBool("/sim/rendering/specular-highlight")) {