From: ehofman Date: Sun, 17 Oct 2004 17:06:50 +0000 (+0000) Subject: Frederic Bouvier: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=39f3c6e41d1ffa0a1ee4c7be66ca84991d49f95b;p=simgear.git 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 --- 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