To handle thread safe paging and use of the osgDB::Registry ObjectCache, moved the handling of cache into osgDB::DatabasePager.

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14472 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield
2014-11-10 16:04:43 +00:00
parent 14620aa1dd
commit 0e9c93f335
2 changed files with 52 additions and 17 deletions

View File

@@ -311,13 +311,19 @@ class OSGDB_EXPORT DatabasePager : public osg::NodeVisitor::DatabaseRequestHandl
_timestampLastRequest(0.0),
_priorityLastRequest(0.0f),
_numOfRequests(0),
_groupExpired(false)
_groupExpired(false),
_insertLoadedSubgraphIntoObjectCache(false)
{}
void invalidate();
bool valid() const { return _valid; }
bool isRequestCurrent (int frameNumber) const
{
return _valid && (frameNumber - _frameNumberLastRequest <= 1);
}
bool _valid;
std::string _fileName;
unsigned int _frameNumberFirstRequest;
@@ -337,10 +343,7 @@ class OSGDB_EXPORT DatabasePager : public osg::NodeVisitor::DatabaseRequestHandl
osg::observer_ptr<osgUtil::IncrementalCompileOperation::CompileSet> _compileSet;
bool _groupExpired; // flag used only in update thread
bool isRequestCurrent (int frameNumber) const
{
return _valid && (frameNumber - _frameNumberLastRequest <= 1);
}
bool _insertLoadedSubgraphIntoObjectCache;
};