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
This commit is contained in:
@@ -29,7 +29,7 @@
|
|||||||
SG_USING_STD(vector);
|
SG_USING_STD(vector);
|
||||||
SG_USING_STD(set);
|
SG_USING_STD(set);
|
||||||
|
|
||||||
|
bool sgUseDisplayList = true;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
// Global state
|
// Global state
|
||||||
@@ -329,7 +329,7 @@ sgLoad3DModel( const string &fg_root, const string &path,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if PLIB_VERSION > 183
|
#if PLIB_VERSION > 183
|
||||||
if ( model != 0 ) {
|
if ( model != 0 && sgUseDisplayList ) {
|
||||||
makeDList( model, ignore_branches );
|
makeDList( model, ignore_branches );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -74,4 +74,9 @@ sgMakeAnimation( ssgBranch * model,
|
|||||||
bool
|
bool
|
||||||
sgSetModelFilter( bool filter );
|
sgSetModelFilter( bool filter );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable or disable Display list usage
|
||||||
|
*/
|
||||||
|
extern bool sgUseDisplayList;
|
||||||
|
|
||||||
#endif // __MODEL_HXX
|
#endif // __MODEL_HXX
|
||||||
|
|||||||
Reference in New Issue
Block a user