]> git.mxchange.org Git - flightgear.git/commitdiff
Frederic Bouvier:
authorehofman <ehofman>
Sun, 17 Oct 2004 17:29:34 +0000 (17:29 +0000)
committerehofman <ehofman>
Sun, 17 Oct 2004 17:29:34 +0000 (17:29 +0000)
This is a patch to make display list usage optional. They are on by default.
Use --prop:/sim/rendering/use-display-list=false to use immediate mode.
There is also a change in exception handling in main.cxx and bootstrap.cxx

src/Main/bootstrap.cxx
src/Main/main.cxx

index 743fc611aa0bf0b06ad5c51705d1fb227a5bd729..d9cad75c5386c89d9130ba3996fe1607d18ad56a 100644 (file)
@@ -188,7 +188,8 @@ int main ( int argc, char **argv ) {
                             // disabled.
         cerr << "Fatal error: " << t.getFormattedMessage()
              << "\n (received from " << t.getOrigin() << ')' << endl;
-        exit(1);
+    } catch (...) {
+        cerr << "Unknown exception in the main loop. Aborting..." << endl;
     }
 
     return 0;
index 8f80effbba949e28f61347de4187d60366f2feba..42fef6d59f399a838058302325eccb7b55e2d086 100644 (file)
@@ -110,7 +110,6 @@ FGGeneral general;
 int idle_state = 0;
 long global_multi_loop;
 
-
 SGTimeStamp last_time_stamp;
 SGTimeStamp current_time_stamp;
 
@@ -722,6 +721,8 @@ bool fgMainInit( int argc, char **argv ) {
         exit(-1);
     }
 
+    sgUseDisplayList = fgGetBool( "/sim/rendering/use-display-list", true );
+
     // Initialize the Aircraft directory to "" (UIUC)
     aircraft_dir = "";
 
@@ -938,13 +939,8 @@ bool fgMainInit( int argc, char **argv ) {
     // build our custom render states
     globals->get_renderer()->build_states();
 
-    try {
-        // pass control off to the master event handler
-        fgOSMainLoop();
-    } catch (...) {
-        SG_LOG( SG_ALL, SG_ALERT,
-            "Unknown exception in the main loop. Aborting..." );
-    }
+    // pass control off to the master event handler
+    fgOSMainLoop();
 
     // we never actually get here ... but to avoid compiler warnings,
     // etc.