typedef std::vector<osg::GraphicsContext*> osgUtil::IncrementalCompileOperation::Contexts |
typedef std::set<osg::GraphicsContext*> osgUtil::IncrementalCompileOperation::ContextSet |
typedef std::map<osg::GraphicsContext*, CompileData > osgUtil::IncrementalCompileOperation::CompileMap |
typedef std::list< osg::ref_ptr<CompileSet> > osgUtil::IncrementalCompileOperation::CompileSets |
osgUtil::IncrementalCompileOperation::IncrementalCompileOperation | ( | ) |
virtual osgUtil::IncrementalCompileOperation::~IncrementalCompileOperation | ( | ) | [protected, virtual] |
void osgUtil::IncrementalCompileOperation::setTargetFrameRate | ( | double | tfr | ) | [inline] |
Set the target frame rate that the IncrementalCompileOperation should assume. Typically one would set this to the value refresh rate of your display system i.e. 60Hz. Default value is 100. Usage notes. The TargetFrameRate and the MinimumTimeAvailableForGLCompileAndDeletePerFrame parameters are not directly used by IncrementalCompileOperation, but are should be used as a guide for how long to set aside per frame for compiling and deleting OpenGL objects. The longer amount of time to set aside the faster databases will be paged in but with increased chance of frame drops, the lower the amount of time the set aside the slower databases will paged it but with better chance of avoid any frame drops. The default values are chosen to achieve the later when running on a modern mid to high end PC. The way to compute the amount of available time use a scheme such as : availableTime = maximum(1.0/targetFrameRate - timeTakenDuringUpdateCullAndDraw, minimumTimeAvailableForGLCompileAndDeletePerFrame).
double osgUtil::IncrementalCompileOperation::getTargetFrameRate | ( | ) | const [inline] |
Get the target frame rate that the IncrementalCompileOperation should assume.
void osgUtil::IncrementalCompileOperation::setMinimumTimeAvailableForGLCompileAndDeletePerFrame | ( | double | ta | ) | [inline] |
Set the minimum amount of time (in seconds) that should be made available for compiling and delete OpenGL objects per frame. Default value is 0.001 (1 millisecond). For usage see notes in setTargetFrameRate.
double osgUtil::IncrementalCompileOperation::getMinimumTimeAvailableForGLCompileAndDeletePerFrame | ( | ) | const [inline] |
Get the minimum amount of time that should be made available for compiling and delete OpenGL objects per frame. For usage see notes in setTargetFrameRate.
void osgUtil::IncrementalCompileOperation::setMaximumNumOfObjectsToCompilePerFrame | ( | unsigned int | num | ) | [inline] |
Set the maximum number of OpenGL objects that the page should attempt to compile per frame. Note, Lower values reduces chances of a frame drop but lower the rate that database will be paged in at. Default value is 8.
unsigned int osgUtil::IncrementalCompileOperation::getMaximumNumOfObjectsToCompilePerFrame | ( | ) | const [inline] |
Get the maximum number of OpenGL objects that the page should attempt to compile per frame.
void osgUtil::IncrementalCompileOperation::setFlushTimeRatio | ( | double | ratio | ) | [inline] |
FlushTimeRatio governs how much of the spare time in each frame is used for flushing deleted OpenGL objects. Default value is 0.5, valid range is 0.1 to 0.9.
double osgUtil::IncrementalCompileOperation::getFlushTimeRatio | ( | ) | const [inline] |
void osgUtil::IncrementalCompileOperation::setConservativeTimeRatio | ( | double | ratio | ) | [inline] |
ConservativeTimeRatio governs how much of the measured spare time in each frame is used for flushing deleted and compile new OpenGL objects. Default value is 0.5, valid range is 0.1 to 1.0. A ratio near 1.0 will lead to paged databases being compiled and merged quicker but increase the chances of frame drop. A ratio near 0.1 will lead to paged databases being compiled and merged closer but reduse the chances of frame drop.
double osgUtil::IncrementalCompileOperation::getConservativeTimeRatio | ( | ) | const [inline] |
void osgUtil::IncrementalCompileOperation::assignContexts | ( | Contexts & | contexts | ) |
void osgUtil::IncrementalCompileOperation::removeContexts | ( | Contexts & | contexts | ) |
void osgUtil::IncrementalCompileOperation::addGraphicsContext | ( | osg::GraphicsContext * | gc | ) |
void osgUtil::IncrementalCompileOperation::removeGraphicsContext | ( | osg::GraphicsContext * | gc | ) |
void osgUtil::IncrementalCompileOperation::mergeCompiledSubgraphs | ( | ) |
Merge subgraphs that have been compiled.
virtual void osgUtil::IncrementalCompileOperation::operator() | ( | osg::GraphicsContext * | context | ) | [virtual] |
Implements osg::GraphicsOperation.
void osgUtil::IncrementalCompileOperation::add | ( | osg::Node * | subgraphToCompile | ) |
Add a subgraph to be compiled.
void osgUtil::IncrementalCompileOperation::add | ( | osg::Group * | attachmentPoint, | |
osg::Node * | subgraphToCompile | |||
) |
Add a subgraph to be compiled and add automatically to attachPoint on call to mergeCompiledSubgraphs.
void osgUtil::IncrementalCompileOperation::add | ( | CompileSet * | compileSet, | |
bool | callBuildCompileMap = true | |||
) |
Add a CompileSet to be compiled.
OpenThreads::Mutex* osgUtil::IncrementalCompileOperation::getToCompiledMutex | ( | ) | [inline] |
CompileSets& osgUtil::IncrementalCompileOperation::getToCompile | ( | ) | [inline] |
OpenThreads::Mutex* osgUtil::IncrementalCompileOperation::getCompiledMutex | ( | ) | [inline] |
CompileSets& osgUtil::IncrementalCompileOperation::getCompiled | ( | ) | [inline] |
double osgUtil::IncrementalCompileOperation::_targetFrameRate [protected] |
double osgUtil::IncrementalCompileOperation::_minimumTimeAvailableForGLCompileAndDeletePerFrame [protected] |
unsigned int osgUtil::IncrementalCompileOperation::_maximumNumOfObjectsToCompilePerFrame [protected] |
double osgUtil::IncrementalCompileOperation::_flushTimeRatio [protected] |
double osgUtil::IncrementalCompileOperation::_conservativeTimeRatio [protected] |