IncrementalCompileOperation
Go to the documentation of this file.
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#ifndef OSGUTIL_INCREMENTALCOMPILEOPERATOR
#define OSGUTIL_INCREMENTALCOMPILEOPERATOR
#include <osgUtil/GLObjectsVisitor>
#include <osg/Geometry>
namespace osgUtil {
class OSGUTIL_EXPORT StateToCompile : public osg::NodeVisitor
{
public:
StateToCompile(GLObjectsVisitor::Mode mode, osg::Object* markerObject);
typedef std::set<osg::Drawable*> DrawableSet;
typedef std::set<osg::StateSet*> StateSetSet;
typedef std::set<osg::Texture*> TextureSet;
typedef std::set<osg::Program*> ProgramSet;
DrawableSet _drawablesHandled;
StateSetSet _statesetsHandled;
GLObjectsVisitor::Mode _mode;
DrawableSet _drawables;
TextureSet _textures;
ProgramSet _programs;
bool _assignPBOToImages;
osg::ref_ptr<osg::PixelBufferObject> _pbo;
osg::ref_ptr<osg::Object> _markerObject;
bool empty() const { return _textures.empty() && _programs.empty() && _drawables.empty(); }
virtual void apply(osg::Node& node);
virtual void apply(osg::Drawable& drawable);
virtual void apply(osg::StateSet& stateset);
virtual void apply(osg::Texture& texture);
};
class OSGUTIL_EXPORT IncrementalCompileOperation : public osg::GraphicsOperation
{
public:
IncrementalCompileOperation();
bool isActive() const { return !_contexts.empty(); }
bool requiresCompile(StateToCompile& stateToCompile);
void setTargetFrameRate(double tfr) { _targetFrameRate = tfr; }
double getTargetFrameRate() const { return _targetFrameRate; }
void setMinimumTimeAvailableForGLCompileAndDeletePerFrame(double ta) { _minimumTimeAvailableForGLCompileAndDeletePerFrame = ta; }
double getMinimumTimeAvailableForGLCompileAndDeletePerFrame() const { return _minimumTimeAvailableForGLCompileAndDeletePerFrame; }
void setMaximumNumOfObjectsToCompilePerFrame(unsigned int num) { _maximumNumOfObjectsToCompilePerFrame = num; }
unsigned int getMaximumNumOfObjectsToCompilePerFrame() const { return _maximumNumOfObjectsToCompilePerFrame; }
void setFlushTimeRatio(double ratio) { _flushTimeRatio = ratio; }
double getFlushTimeRatio() const { return _flushTimeRatio; }
void setConservativeTimeRatio(double ratio) { _conservativeTimeRatio = ratio; }
double getConservativeTimeRatio() const { return _conservativeTimeRatio; }
void assignForceTextureDownloadGeometry();
void setForceTextureDownloadGeometry(osg::Geometry* geom) { _forceTextureDownloadGeometry = geom; }
osg::Geometry* getForceTextureDownloadGeometry() { return _forceTextureDownloadGeometry.get(); }
const osg::Geometry* getForceTextureDownloadGeometry() const { return _forceTextureDownloadGeometry.get(); }
typedef std::vector<osg::GraphicsContext*> Contexts;
void assignContexts(Contexts& contexts);
void removeContexts(Contexts& contexts);
void addGraphicsContext(osg::GraphicsContext* gc);
void removeGraphicsContext(osg::GraphicsContext* gc);
typedef std::set<osg::GraphicsContext*> ContextSet;
ContextSet& getContextSet() { return _contexts; }
const ContextSet& getContextSet() const { return _contexts; }
void mergeCompiledSubgraphs(const osg::FrameStamp* frameStamp);
void setCurrentFrameNumber(unsigned int fn) { _currentFrameNumber = fn; }
unsigned int getCurrentFrameNumber() const { return _currentFrameNumber; }
void compileAllForNextFrame(unsigned int numFramesToDoCompileAll=1);
void setCompileAllTillFrameNumber(unsigned int fn) { _compileAllTillFrameNumber = fn; }
unsigned int getCompileAllTillFrameNumber() const { return _compileAllTillFrameNumber; }
virtual void operator () (osg::GraphicsContext* context);
struct OSGUTIL_EXPORT CompileInfo : public osg::RenderInfo
{
CompileInfo(osg::GraphicsContext* context, IncrementalCompileOperation* ico);
bool okToCompile(double estimatedTimeForCompile=0.0) const
{
if (compileAll) return true;
if (maxNumObjectsToCompile==0) return false;
return (allocatedTime - timer.elapsedTime()) >= estimatedTimeForCompile;
}
IncrementalCompileOperation* incrementalCompileOperation;
bool compileAll;
unsigned int maxNumObjectsToCompile;
double allocatedTime;
osg::ElapsedTime timer;
};
struct CompileOp : public osg::Referenced
{
virtual double estimatedTimeForCompile(CompileInfo& compileInfo) const = 0;
virtual bool compile(CompileInfo& compileInfo) = 0;
};
struct OSGUTIL_EXPORT CompileDrawableOp : public CompileOp
{
CompileDrawableOp(osg::Drawable* drawable);
double estimatedTimeForCompile(CompileInfo& compileInfo) const;
bool compile(CompileInfo& compileInfo);
osg::ref_ptr<osg::Drawable> _drawable;
};
struct OSGUTIL_EXPORT CompileTextureOp : public CompileOp
{
CompileTextureOp(osg::Texture* texture);
double estimatedTimeForCompile(CompileInfo& compileInfo) const;
bool compile(CompileInfo& compileInfo);
osg::ref_ptr<osg::Texture> _texture;
};
struct OSGUTIL_EXPORT CompileProgramOp : public CompileOp
{
CompileProgramOp(osg::Program* program);
double estimatedTimeForCompile(CompileInfo& compileInfo) const;
bool compile(CompileInfo& compileInfo);
osg::ref_ptr<osg::Program> _program;
};
class OSGUTIL_EXPORT CompileList
{
public:
CompileList();
~CompileList();
bool empty() const { return _compileOps.empty(); }
void add(CompileOp* compileOp);
void add(osg::Drawable* drawable) { add(new CompileDrawableOp(drawable)); }
void add(osg::Texture* texture) { add(new CompileTextureOp(texture)); }
void add(osg::Program* program) { add(new CompileProgramOp(program)); }
double estimatedTimeForCompile(CompileInfo& compileInfo) const;
bool compile(CompileInfo& compileInfo);
typedef std::list< osg::ref_ptr<CompileOp> > CompileOps;
CompileOps _compileOps;
};
class CompileSet;
struct CompileCompletedCallback : public virtual osg::Referenced
{
virtual bool compileCompleted(CompileSet* compileSet) = 0;
};
class OSGUTIL_EXPORT CompileSet : public osg::Referenced
{
public:
CompileSet() {}
CompileSet(osg::Node*subgraphToCompile):
_subgraphToCompile(subgraphToCompile) {}
CompileSet(osg::Group* attachmentPoint, osg::Node* subgraphToCompile):
_attachmentPoint(attachmentPoint),
_subgraphToCompile(subgraphToCompile) {}
void buildCompileMap(ContextSet& contexts, StateToCompile& stateToCompile);
void buildCompileMap(ContextSet& contexts, GLObjectsVisitor::Mode mode=GLObjectsVisitor::COMPILE_DISPLAY_LISTS|GLObjectsVisitor::COMPILE_STATE_ATTRIBUTES);
bool compile(CompileInfo& compileInfo);
bool compiled() const { return _numberCompileListsToCompile==0; }
OpenThreads::Atomic _numberCompileListsToCompile;
osg::observer_ptr<osg::Group> _attachmentPoint;
osg::ref_ptr<osg::Node> _subgraphToCompile;
osg::ref_ptr<CompileCompletedCallback> _compileCompletedCallback;
typedef std::map<osg::GraphicsContext*, CompileList > CompileMap;
CompileMap _compileMap;
osg::ref_ptr<osg::Object> _markerObject;
protected:
virtual ~CompileSet() {}
};
typedef std::list< osg::ref_ptr<CompileSet> > CompileSets;
void add(osg::Node* subgraphToCompile);
void add(osg::Group* attachmentPoint, osg::Node* subgraphToCompile);
void add(CompileSet* compileSet, bool callBuildCompileMap=true);
void remove(CompileSet* compileSet);
OpenThreads::Mutex* getToCompiledMutex() { return &_toCompileMutex; }
CompileSets& getToCompile() { return _toCompile; }
OpenThreads::Mutex* getCompiledMutex() { return &_compiledMutex; }
CompileSets& getCompiled() { return _compiled; }
void setMarkerObject(osg::Object* mo) { _markerObject = mo; }
osg::Object* getMarkerObject() { return _markerObject.get(); }
const osg::Object* getMarkerObject() const { return _markerObject.get(); }
protected:
virtual ~IncrementalCompileOperation();
void compileSets(CompileSets& toCompile, CompileInfo& compileInfo);
double _targetFrameRate;
double _minimumTimeAvailableForGLCompileAndDeletePerFrame;
unsigned int _maximumNumOfObjectsToCompilePerFrame;
double _flushTimeRatio;
double _conservativeTimeRatio;
unsigned int _currentFrameNumber;
unsigned int _compileAllTillFrameNumber;
osg::ref_ptr<osg::Geometry> _forceTextureDownloadGeometry;
OpenThreads::Mutex _toCompileMutex;
CompileSets _toCompile;
OpenThreads::Mutex _compiledMutex;
CompileSets _compiled;
ContextSet _contexts;
osg::ref_ptr<osg::Object> _markerObject;
};
}
#endif
GLObjectsVisitor
Geometry
OpenThreads::Atomic
This class provides an atomic increment and decrement operation.
Definition Atomic:48
OpenThreads::Mutex
This class provides an object-oriented thread mutex interface.
Definition Mutex:31
osgUtil::GLObjectsVisitor::COMPILE_STATE_ATTRIBUTES
@ COMPILE_STATE_ATTRIBUTES
Definition GLObjectsVisitor:40
osgUtil::GLObjectsVisitor::COMPILE_DISPLAY_LISTS
@ COMPILE_DISPLAY_LISTS
Definition GLObjectsVisitor:39
osgUtil::GLObjectsVisitor::Mode
unsigned int Mode
Definition GLObjectsVisitor:48
osgUtil::IncrementalCompileOperation::CompileList::compile
bool compile(CompileInfo &compileInfo)
osgUtil::IncrementalCompileOperation::CompileList::CompileOps
std::list< osg::ref_ptr< CompileOp > > CompileOps
Definition IncrementalCompileOperation:227
osgUtil::IncrementalCompileOperation::CompileList::add
void add(CompileOp *compileOp)
osgUtil::IncrementalCompileOperation::CompileList::add
void add(osg::Program *program)
Definition IncrementalCompileOperation:221
osgUtil::IncrementalCompileOperation::CompileList::add
void add(osg::Drawable *drawable)
Definition IncrementalCompileOperation:219
osgUtil::IncrementalCompileOperation::CompileList::empty
bool empty() const
Definition IncrementalCompileOperation:217
osgUtil::IncrementalCompileOperation::CompileList::CompileList
CompileList()
osgUtil::IncrementalCompileOperation::CompileList::_compileOps
CompileOps _compileOps
Definition IncrementalCompileOperation:228
osgUtil::IncrementalCompileOperation::CompileList::add
void add(osg::Texture *texture)
Definition IncrementalCompileOperation:220
osgUtil::IncrementalCompileOperation::CompileList::~CompileList
~CompileList()
osgUtil::IncrementalCompileOperation::CompileList::estimatedTimeForCompile
double estimatedTimeForCompile(CompileInfo &compileInfo) const
osgUtil::IncrementalCompileOperation::CompileSet
Definition IncrementalCompileOperation:242
osgUtil::IncrementalCompileOperation::CompileSet::CompileMap
std::map< osg::GraphicsContext *, CompileList > CompileMap
Definition IncrementalCompileOperation:266
osgUtil::IncrementalCompileOperation::CompileSet::_subgraphToCompile
osg::ref_ptr< osg::Node > _subgraphToCompile
Definition IncrementalCompileOperation:263
osgUtil::IncrementalCompileOperation::CompileSet::_numberCompileListsToCompile
OpenThreads::Atomic _numberCompileListsToCompile
Definition IncrementalCompileOperation:260
osgUtil::IncrementalCompileOperation::CompileSet::CompileSet
CompileSet(osg::Group *attachmentPoint, osg::Node *subgraphToCompile)
Definition IncrementalCompileOperation:249
osgUtil::IncrementalCompileOperation::CompileSet::CompileSet
CompileSet(osg::Node *subgraphToCompile)
Definition IncrementalCompileOperation:246
osgUtil::IncrementalCompileOperation::CompileSet::_attachmentPoint
osg::observer_ptr< osg::Group > _attachmentPoint
Definition IncrementalCompileOperation:262
osgUtil::IncrementalCompileOperation::CompileSet::buildCompileMap
void buildCompileMap(ContextSet &contexts, GLObjectsVisitor::Mode mode=GLObjectsVisitor::COMPILE_DISPLAY_LISTS|GLObjectsVisitor::COMPILE_STATE_ATTRIBUTES)
osgUtil::IncrementalCompileOperation::CompileSet::CompileSet
CompileSet()
Definition IncrementalCompileOperation:244
osgUtil::IncrementalCompileOperation::CompileSet::compile
bool compile(CompileInfo &compileInfo)
osgUtil::IncrementalCompileOperation::CompileSet::_markerObject
osg::ref_ptr< osg::Object > _markerObject
Definition IncrementalCompileOperation:269
osgUtil::IncrementalCompileOperation::CompileSet::buildCompileMap
void buildCompileMap(ContextSet &contexts, StateToCompile &stateToCompile)
osgUtil::IncrementalCompileOperation::CompileSet::compiled
bool compiled() const
Definition IncrementalCompileOperation:258
osgUtil::IncrementalCompileOperation::CompileSet::_compileCompletedCallback
osg::ref_ptr< CompileCompletedCallback > _compileCompletedCallback
Definition IncrementalCompileOperation:264
osgUtil::IncrementalCompileOperation::CompileSet::~CompileSet
virtual ~CompileSet()
Definition IncrementalCompileOperation:273
osgUtil::IncrementalCompileOperation::CompileSet::_compileMap
CompileMap _compileMap
Definition IncrementalCompileOperation:267
osgUtil::IncrementalCompileOperation::_compileAllTillFrameNumber
unsigned int _compileAllTillFrameNumber
Definition IncrementalCompileOperation:313
osgUtil::IncrementalCompileOperation::_maximumNumOfObjectsToCompilePerFrame
unsigned int _maximumNumOfObjectsToCompilePerFrame
Definition IncrementalCompileOperation:308
osgUtil::IncrementalCompileOperation::mergeCompiledSubgraphs
void mergeCompiledSubgraphs(const osg::FrameStamp *frameStamp)
osgUtil::IncrementalCompileOperation::getTargetFrameRate
double getTargetFrameRate() const
Definition IncrementalCompileOperation:82
osgUtil::IncrementalCompileOperation::getMinimumTimeAvailableForGLCompileAndDeletePerFrame
double getMinimumTimeAvailableForGLCompileAndDeletePerFrame() const
Definition IncrementalCompileOperation:91
osgUtil::IncrementalCompileOperation::isActive
bool isActive() const
Definition IncrementalCompileOperation:62
osgUtil::IncrementalCompileOperation::addGraphicsContext
void addGraphicsContext(osg::GraphicsContext *gc)
osgUtil::IncrementalCompileOperation::IncrementalCompileOperation
IncrementalCompileOperation()
osgUtil::IncrementalCompileOperation::add
void add(osg::Node *subgraphToCompile)
osgUtil::IncrementalCompileOperation::_contexts
ContextSet _contexts
Definition IncrementalCompileOperation:323
osgUtil::IncrementalCompileOperation::getToCompiledMutex
OpenThreads::Mutex * getToCompiledMutex()
Definition IncrementalCompileOperation:290
osgUtil::IncrementalCompileOperation::getCompileAllTillFrameNumber
unsigned int getCompileAllTillFrameNumber() const
Definition IncrementalCompileOperation:153
osgUtil::IncrementalCompileOperation::_compiled
CompileSets _compiled
Definition IncrementalCompileOperation:321
osgUtil::IncrementalCompileOperation::CompileSets
std::list< osg::ref_ptr< CompileSet > > CompileSets
Definition IncrementalCompileOperation:276
osgUtil::IncrementalCompileOperation::getContextSet
ContextSet & getContextSet()
Definition IncrementalCompileOperation:132
osgUtil::IncrementalCompileOperation::getMarkerObject
const osg::Object * getMarkerObject() const
Definition IncrementalCompileOperation:298
osgUtil::IncrementalCompileOperation::assignForceTextureDownloadGeometry
void assignForceTextureDownloadGeometry()
osgUtil::IncrementalCompileOperation::setCurrentFrameNumber
void setCurrentFrameNumber(unsigned int fn)
Definition IncrementalCompileOperation:143
osgUtil::IncrementalCompileOperation::setFlushTimeRatio
void setFlushTimeRatio(double ratio)
Definition IncrementalCompileOperation:104
osgUtil::IncrementalCompileOperation::getCompiledMutex
OpenThreads::Mutex * getCompiledMutex()
Definition IncrementalCompileOperation:293
osgUtil::IncrementalCompileOperation::getForceTextureDownloadGeometry
osg::Geometry * getForceTextureDownloadGeometry()
Definition IncrementalCompileOperation:121
osgUtil::IncrementalCompileOperation::setMinimumTimeAvailableForGLCompileAndDeletePerFrame
void setMinimumTimeAvailableForGLCompileAndDeletePerFrame(double ta)
Definition IncrementalCompileOperation:87
osgUtil::IncrementalCompileOperation::requiresCompile
bool requiresCompile(StateToCompile &stateToCompile)
osgUtil::IncrementalCompileOperation::_markerObject
osg::ref_ptr< osg::Object > _markerObject
Definition IncrementalCompileOperation:325
osgUtil::IncrementalCompileOperation::add
void add(osg::Group *attachmentPoint, osg::Node *subgraphToCompile)
osgUtil::IncrementalCompileOperation::setTargetFrameRate
void setTargetFrameRate(double tfr)
Definition IncrementalCompileOperation:79
osgUtil::IncrementalCompileOperation::_currentFrameNumber
unsigned int _currentFrameNumber
Definition IncrementalCompileOperation:312
osgUtil::IncrementalCompileOperation::_targetFrameRate
double _targetFrameRate
Definition IncrementalCompileOperation:306
osgUtil::IncrementalCompileOperation::_conservativeTimeRatio
double _conservativeTimeRatio
Definition IncrementalCompileOperation:310
osgUtil::IncrementalCompileOperation::setCompileAllTillFrameNumber
void setCompileAllTillFrameNumber(unsigned int fn)
Definition IncrementalCompileOperation:152
osgUtil::IncrementalCompileOperation::setForceTextureDownloadGeometry
void setForceTextureDownloadGeometry(osg::Geometry *geom)
Definition IncrementalCompileOperation:120
osgUtil::IncrementalCompileOperation::compileAllForNextFrame
void compileAllForNextFrame(unsigned int numFramesToDoCompileAll=1)
osgUtil::IncrementalCompileOperation::getFlushTimeRatio
double getFlushTimeRatio() const
Definition IncrementalCompileOperation:105
osgUtil::IncrementalCompileOperation::ContextSet
std::set< osg::GraphicsContext * > ContextSet
Definition IncrementalCompileOperation:131
osgUtil::IncrementalCompileOperation::_forceTextureDownloadGeometry
osg::ref_ptr< osg::Geometry > _forceTextureDownloadGeometry
Definition IncrementalCompileOperation:315
osgUtil::IncrementalCompileOperation::_toCompileMutex
OpenThreads::Mutex _toCompileMutex
Definition IncrementalCompileOperation:317
osgUtil::IncrementalCompileOperation::getMarkerObject
osg::Object * getMarkerObject()
Definition IncrementalCompileOperation:297
osgUtil::IncrementalCompileOperation::remove
void remove(CompileSet *compileSet)
osgUtil::IncrementalCompileOperation::setMaximumNumOfObjectsToCompilePerFrame
void setMaximumNumOfObjectsToCompilePerFrame(unsigned int num)
Definition IncrementalCompileOperation:96
osgUtil::IncrementalCompileOperation::setMarkerObject
void setMarkerObject(osg::Object *mo)
Definition IncrementalCompileOperation:296
osgUtil::IncrementalCompileOperation::_toCompile
CompileSets _toCompile
Definition IncrementalCompileOperation:318
osgUtil::IncrementalCompileOperation::_minimumTimeAvailableForGLCompileAndDeletePerFrame
double _minimumTimeAvailableForGLCompileAndDeletePerFrame
Definition IncrementalCompileOperation:307
osgUtil::IncrementalCompileOperation::setConservativeTimeRatio
void setConservativeTimeRatio(double ratio)
Definition IncrementalCompileOperation:111
osgUtil::IncrementalCompileOperation::removeContexts
void removeContexts(Contexts &contexts)
osgUtil::IncrementalCompileOperation::Contexts
std::vector< osg::GraphicsContext * > Contexts
Definition IncrementalCompileOperation:124
osgUtil::IncrementalCompileOperation::_flushTimeRatio
double _flushTimeRatio
Definition IncrementalCompileOperation:309
osgUtil::IncrementalCompileOperation::assignContexts
void assignContexts(Contexts &contexts)
osgUtil::IncrementalCompileOperation::getForceTextureDownloadGeometry
const osg::Geometry * getForceTextureDownloadGeometry() const
Definition IncrementalCompileOperation:122
osgUtil::IncrementalCompileOperation::getContextSet
const ContextSet & getContextSet() const
Definition IncrementalCompileOperation:133
osgUtil::IncrementalCompileOperation::getCurrentFrameNumber
unsigned int getCurrentFrameNumber() const
Definition IncrementalCompileOperation:144
osgUtil::IncrementalCompileOperation::getMaximumNumOfObjectsToCompilePerFrame
unsigned int getMaximumNumOfObjectsToCompilePerFrame() const
Definition IncrementalCompileOperation:99
osgUtil::IncrementalCompileOperation::_compiledMutex
OpenThreads::Mutex _compiledMutex
Definition IncrementalCompileOperation:320
osgUtil::IncrementalCompileOperation::getCompiled
CompileSets & getCompiled()
Definition IncrementalCompileOperation:294
osgUtil::IncrementalCompileOperation::compileSets
void compileSets(CompileSets &toCompile, CompileInfo &compileInfo)
osgUtil::IncrementalCompileOperation::add
void add(CompileSet *compileSet, bool callBuildCompileMap=true)
osgUtil::IncrementalCompileOperation::removeGraphicsContext
void removeGraphicsContext(osg::GraphicsContext *gc)
osgUtil::IncrementalCompileOperation::getConservativeTimeRatio
double getConservativeTimeRatio() const
Definition IncrementalCompileOperation:112
osgUtil::IncrementalCompileOperation::getToCompile
CompileSets & getToCompile()
Definition IncrementalCompileOperation:291
osgUtil::IncrementalCompileOperation::~IncrementalCompileOperation
virtual ~IncrementalCompileOperation()
osgUtil::StateToCompile
Definition IncrementalCompileOperation:24
osgUtil::StateToCompile::DrawableSet
std::set< osg::Drawable * > DrawableSet
Definition IncrementalCompileOperation:29
osgUtil::StateToCompile::StateSetSet
std::set< osg::StateSet * > StateSetSet
Definition IncrementalCompileOperation:30
osgUtil::StateToCompile::_pbo
osg::ref_ptr< osg::PixelBufferObject > _pbo
Definition IncrementalCompileOperation:42
osgUtil::StateToCompile::StateToCompile
StateToCompile(GLObjectsVisitor::Mode mode, osg::Object *markerObject)
osgUtil::StateToCompile::_programs
ProgramSet _programs
Definition IncrementalCompileOperation:40
osgUtil::StateToCompile::empty
bool empty() const
Definition IncrementalCompileOperation:45
osgUtil::StateToCompile::apply
virtual void apply(osg::Texture &texture)
osgUtil::StateToCompile::apply
virtual void apply(osg::Node &node)
osgUtil::StateToCompile::_drawablesHandled
DrawableSet _drawablesHandled
Definition IncrementalCompileOperation:34
osgUtil::StateToCompile::apply
virtual void apply(osg::Drawable &drawable)
osgUtil::StateToCompile::_assignPBOToImages
bool _assignPBOToImages
Definition IncrementalCompileOperation:41
osgUtil::StateToCompile::_mode
GLObjectsVisitor::Mode _mode
Definition IncrementalCompileOperation:37
osgUtil::StateToCompile::_markerObject
osg::ref_ptr< osg::Object > _markerObject
Definition IncrementalCompileOperation:43
osgUtil::StateToCompile::ProgramSet
std::set< osg::Program * > ProgramSet
Definition IncrementalCompileOperation:32
osgUtil::StateToCompile::_drawables
DrawableSet _drawables
Definition IncrementalCompileOperation:38
osgUtil::StateToCompile::apply
virtual void apply(osg::StateSet &stateset)
osgUtil::StateToCompile::_textures
TextureSet _textures
Definition IncrementalCompileOperation:39
osgUtil::StateToCompile::_statesetsHandled
StateSetSet _statesetsHandled
Definition IncrementalCompileOperation:35
osgUtil::StateToCompile::TextureSet
std::set< osg::Texture * > TextureSet
Definition IncrementalCompileOperation:31
osg::Drawable
Definition Drawable:89
osg::ElapsedTime
Definition Timer:81
osg::FrameStamp
Definition FrameStamp:35
osg::Geometry
Definition Geometry:31
osg::GraphicsContext
Definition GraphicsContext:30
osg::Group
Definition Group:29
osg::NodeVisitor
Definition NodeVisitor:82
osg::Node
Definition Node:72
osg::Object
Definition Object:61
osg::Program
Definition osg/Program:52
osg::Referenced
Definition Referenced:44
osg::RenderInfo
Definition RenderInfo:28
osg::StateSet
Definition StateSet:46
osg::Texture
Definition Texture:422
osg::observer_ptr
Definition observer_ptr:39
osg::ref_ptr
Definition ref_ptr:32
osgUtil
Definition NodeVisitor:25
OSGUTIL_EXPORT
#define OSGUTIL_EXPORT
Definition osgUtil/Export:40
osgUtil::IncrementalCompileOperation::CompileCompletedCallback
Definition IncrementalCompileOperation:235
osgUtil::IncrementalCompileOperation::CompileCompletedCallback::compileCompleted
virtual bool compileCompleted(CompileSet *compileSet)=0
osgUtil::IncrementalCompileOperation::CompileDrawableOp
Definition IncrementalCompileOperation:188
osgUtil::IncrementalCompileOperation::CompileDrawableOp::_drawable
osg::ref_ptr< osg::Drawable > _drawable
Definition IncrementalCompileOperation:192
osgUtil::IncrementalCompileOperation::CompileDrawableOp::compile
bool compile(CompileInfo &compileInfo)
osgUtil::IncrementalCompileOperation::CompileDrawableOp::estimatedTimeForCompile
double estimatedTimeForCompile(CompileInfo &compileInfo) const
osgUtil::IncrementalCompileOperation::CompileDrawableOp::CompileDrawableOp
CompileDrawableOp(osg::Drawable *drawable)
osgUtil::IncrementalCompileOperation::CompileInfo
Definition IncrementalCompileOperation:161
osgUtil::IncrementalCompileOperation::CompileInfo::incrementalCompileOperation
IncrementalCompileOperation * incrementalCompileOperation
Definition IncrementalCompileOperation:171
osgUtil::IncrementalCompileOperation::CompileInfo::CompileInfo
CompileInfo(osg::GraphicsContext *context, IncrementalCompileOperation *ico)
osgUtil::IncrementalCompileOperation::CompileInfo::maxNumObjectsToCompile
unsigned int maxNumObjectsToCompile
Definition IncrementalCompileOperation:174
osgUtil::IncrementalCompileOperation::CompileInfo::okToCompile
bool okToCompile(double estimatedTimeForCompile=0.0) const
Definition IncrementalCompileOperation:164
osgUtil::IncrementalCompileOperation::CompileInfo::timer
osg::ElapsedTime timer
Definition IncrementalCompileOperation:176
osgUtil::IncrementalCompileOperation::CompileInfo::allocatedTime
double allocatedTime
Definition IncrementalCompileOperation:175
osgUtil::IncrementalCompileOperation::CompileInfo::compileAll
bool compileAll
Definition IncrementalCompileOperation:173
osgUtil::IncrementalCompileOperation::CompileOp
Definition IncrementalCompileOperation:180
osgUtil::IncrementalCompileOperation::CompileOp::estimatedTimeForCompile
virtual double estimatedTimeForCompile(CompileInfo &compileInfo) const =0
osgUtil::IncrementalCompileOperation::CompileOp::compile
virtual bool compile(CompileInfo &compileInfo)=0
osgUtil::IncrementalCompileOperation::CompileProgramOp
Definition IncrementalCompileOperation:204
osgUtil::IncrementalCompileOperation::CompileProgramOp::CompileProgramOp
CompileProgramOp(osg::Program *program)
osgUtil::IncrementalCompileOperation::CompileProgramOp::estimatedTimeForCompile
double estimatedTimeForCompile(CompileInfo &compileInfo) const
osgUtil::IncrementalCompileOperation::CompileProgramOp::compile
bool compile(CompileInfo &compileInfo)
osgUtil::IncrementalCompileOperation::CompileProgramOp::_program
osg::ref_ptr< osg::Program > _program
Definition IncrementalCompileOperation:208
osgUtil::IncrementalCompileOperation::CompileTextureOp
Definition IncrementalCompileOperation:196
osgUtil::IncrementalCompileOperation::CompileTextureOp::compile
bool compile(CompileInfo &compileInfo)
osgUtil::IncrementalCompileOperation::CompileTextureOp::CompileTextureOp
CompileTextureOp(osg::Texture *texture)
osgUtil::IncrementalCompileOperation::CompileTextureOp::estimatedTimeForCompile
double estimatedTimeForCompile(CompileInfo &compileInfo) const
osgUtil::IncrementalCompileOperation::CompileTextureOp::_texture
osg::ref_ptr< osg::Texture > _texture
Definition IncrementalCompileOperation:200
osg::GraphicsOperation
Definition GraphicsThread:36