From Serge Lages, "Here are some modifications to the DatabasePager, with the possibility to :
- Get or set the target number of PagedLOD children to remove per frame. - Get or set the minimum number of inactive PagedLOD to keep. Corresponding environment variables have been added too. The default values reproduce the previous DatabasePager behavior."
This commit is contained in:
@@ -249,6 +249,17 @@ class OSGDB_EXPORT DatabasePager : public osg::NodeVisitor::DatabaseRequestHandl
|
||||
/** Reset the Stats variables.*/
|
||||
void resetStats();
|
||||
|
||||
/** Set the maximum number of PagedLOD child to remove per frame */
|
||||
void setMaximumNumOfRemovedChildPagedLODs(unsigned int number) { _maximumNumOfRemovedChildPagedLODs = number; }
|
||||
|
||||
/** Get the maximum number of PagedLOD child to remove per frame */
|
||||
unsigned int getMaximumNumOfRemovedChildPagedLODs() const { return _maximumNumOfRemovedChildPagedLODs; }
|
||||
|
||||
/** Set the minimum number of inactive PagedLOD child to keep */
|
||||
void setMinimumNumOfInactivePagedLODs(unsigned int number) { _minimumNumOfInactivePagedLODs = number; }
|
||||
|
||||
/** Get the minimum number of inactive PagedLOD child to keep */
|
||||
unsigned int getMinimumNumOfInactivePagedLODs() const { return _minimumNumOfInactivePagedLODs; }
|
||||
|
||||
typedef std::list< osg::ref_ptr<osg::PagedLOD> > PagedLODList;
|
||||
typedef std::set< osg::ref_ptr<osg::StateSet> > StateSetList;
|
||||
@@ -362,6 +373,8 @@ class OSGDB_EXPORT DatabasePager : public osg::NodeVisitor::DatabaseRequestHandl
|
||||
double _targetFrameRate;
|
||||
double _minimumTimeAvailableForGLCompileAndDeletePerFrame;
|
||||
unsigned int _maximumNumOfObjectsToCompilePerFrame;
|
||||
unsigned int _maximumNumOfRemovedChildPagedLODs;
|
||||
unsigned int _minimumNumOfInactivePagedLODs;
|
||||
|
||||
double _minimumTimeToMergeTile;
|
||||
double _maximumTimeToMergeTile;
|
||||
|
||||
Reference in New Issue
Block a user