From 39f3c6e41d1ffa0a1ee4c7be66ca84991d49f95b Mon Sep 17 00:00:00 2001 From: ehofman Date: Sun, 17 Oct 2004 17:06:50 +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 --- simgear/scene/model/model.cxx | 4 ++-- simgear/scene/model/model.hxx | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/simgear/scene/model/model.cxx b/simgear/scene/model/model.cxx index c45bcfb0..9091c3b5 100644 --- a/simgear/scene/model/model.cxx +++ b/simgear/scene/model/model.cxx @@ -29,7 +29,7 @@ SG_USING_STD(vector); SG_USING_STD(set); - +bool sgUseDisplayList = true; //////////////////////////////////////////////////////////////////////// // Global state @@ -329,7 +329,7 @@ sgLoad3DModel( const string &fg_root, const string &path, } #if PLIB_VERSION > 183 - if ( model != 0 ) { + if ( model != 0 && sgUseDisplayList ) { makeDList( model, ignore_branches ); } #endif diff --git a/simgear/scene/model/model.hxx b/simgear/scene/model/model.hxx index e995c120..a4220cdb 100644 --- a/simgear/scene/model/model.hxx +++ b/simgear/scene/model/model.hxx @@ -74,4 +74,9 @@ sgMakeAnimation( ssgBranch * model, bool sgSetModelFilter( bool filter ); +/** + * Enable or disable Display list usage + */ +extern bool sgUseDisplayList; + #endif // __MODEL_HXX -- 2.39.5