Moved Registry::ReadFileCallback + WriteFileCallback, and osgDB::ReaderWriter::Options into their own separate Options file and into the osgDB namespace.
Introduced a new callback osgDB::FindFileCallback that overrides the default behavior of findDataFile/findLibraryFile. Introduced support for assigning ReaderWriter::Options directory to PagedLOD. Introduced new osgDB::FileLocationCallback for assistancing the DatabasePager to know when a file is hosted on a local or remote file system.
This commit is contained in:
@@ -58,6 +58,7 @@ PagedLOD::PagedLOD()
|
||||
|
||||
PagedLOD::PagedLOD(const PagedLOD& plod,const CopyOp& copyop):
|
||||
LOD(plod,copyop),
|
||||
_databaseOptions(plod._databaseOptions),
|
||||
_databasePath(plod._databasePath),
|
||||
_frameNumberOfLastTraversal(plod._frameNumberOfLastTraversal),
|
||||
_numChildrenThatCannotBeExpired(plod._numChildrenThatCannotBeExpired),
|
||||
@@ -213,16 +214,15 @@ void PagedLOD::traverse(NodeVisitor& nv)
|
||||
|
||||
if (_databasePath.empty())
|
||||
{
|
||||
nv.getDatabaseRequestHandler()->requestNodeFile(_perRangeDataList[numChildren]._filename,this,priority,nv.getFrameStamp(), _perRangeDataList[numChildren]._databaseRequest);
|
||||
nv.getDatabaseRequestHandler()->requestNodeFile(_perRangeDataList[numChildren]._filename,this,priority,nv.getFrameStamp(), _perRangeDataList[numChildren]._databaseRequest, _databaseOptions.get());
|
||||
}
|
||||
else
|
||||
{
|
||||
// prepend the databasePath to the child's filename.
|
||||
nv.getDatabaseRequestHandler()->requestNodeFile(_databasePath+_perRangeDataList[numChildren]._filename,this,priority,nv.getFrameStamp(), _perRangeDataList[numChildren]._databaseRequest);
|
||||
nv.getDatabaseRequestHandler()->requestNodeFile(_databasePath+_perRangeDataList[numChildren]._filename,this,priority,nv.getFrameStamp(), _perRangeDataList[numChildren]._databaseRequest, _databaseOptions.get());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user