Refactored the Registry::ReadFileCallback, WriteFileCallback and ReaderWriter::Options to they are now defined in their own header and in the osgDB namespace.
Introduced a new FindFileCallback to Registry to compliement the existing ReadFileCallback and WriteFileCallback. Added support for assign Find, Read and WriteFileCallbacks to osdDB::Options to enable plugins/applications to override the callbacks just for that read/write call and any nested file operations
This commit is contained in:
@@ -46,7 +46,7 @@ bool FileCache::existsInCache(const std::string& originalFileName) const
|
||||
return osgDB::fileExists(createCacheFileName(originalFileName));
|
||||
}
|
||||
|
||||
ReaderWriter::ReadResult FileCache::readNode(const std::string& originalFileName, const osgDB::ReaderWriter::Options* options, bool buildKdTreeIfRequired) const
|
||||
ReaderWriter::ReadResult FileCache::readNode(const std::string& originalFileName, const osgDB::Options* options, bool buildKdTreeIfRequired) const
|
||||
{
|
||||
std::string cacheFileName = createCacheFileName(originalFileName);
|
||||
if (!cacheFileName.empty() && osgDB::fileExists(cacheFileName))
|
||||
@@ -60,7 +60,7 @@ ReaderWriter::ReadResult FileCache::readNode(const std::string& originalFileName
|
||||
}
|
||||
}
|
||||
|
||||
ReaderWriter::WriteResult FileCache::writeNode(const osg::Node& node, const std::string& originalFileName, const osgDB::ReaderWriter::Options* options) const
|
||||
ReaderWriter::WriteResult FileCache::writeNode(const osg::Node& node, const std::string& originalFileName, const osgDB::Options* options) const
|
||||
{
|
||||
std::string cacheFileName = createCacheFileName(originalFileName);
|
||||
if (!cacheFileName.empty())
|
||||
|
||||
Reference in New Issue
Block a user