From 2b6b970b809bd6d9f194709dd9bd2229e9984251 Mon Sep 17 00:00:00 2001 From: ehofman Date: Sun, 17 Oct 2004 17:29:34 +0000 Subject: [PATCH] Frederic Bouvier: 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 | 3 ++- src/Main/main.cxx | 12 ++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/Main/bootstrap.cxx b/src/Main/bootstrap.cxx index 743fc611a..d9cad75c5 100644 --- a/src/Main/bootstrap.cxx +++ b/src/Main/bootstrap.cxx @@ -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; diff --git a/src/Main/main.cxx b/src/Main/main.cxx index 8f80effbb..42fef6d59 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -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.