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:
Robert Osfield
2007-12-06 17:31:00 +00:00
parent 6c09a22957
commit b7881943d4
2 changed files with 29 additions and 3 deletions

View File

@@ -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;