Moved the responsibility for finding file to load on to the ReaderWriter plugins,
instead of osgDB::Registry where it original lay. This has been done to allow fileName strings to be encode data rather than just file names, such as one requires when using PagedLOD along with plugins for doing dynamic tesselation.
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
#include <osg/GL>
|
||||
|
||||
#include <osgDB/FileNameUtils>
|
||||
#include <osgDB/FileUtils>
|
||||
#include <osgDB/Registry>
|
||||
|
||||
#include <iostream>
|
||||
@@ -748,11 +749,14 @@ class ReaderWriterATTR : public osgDB::ReaderWriter
|
||||
return osgDB::equalCaseInsensitive(extension,"attr");
|
||||
}
|
||||
|
||||
virtual ReadResult readObject(const std::string& fileName, const osgDB::ReaderWriter::Options*)
|
||||
virtual ReadResult readObject(const std::string& file, const osgDB::ReaderWriter::Options*)
|
||||
{
|
||||
std::string ext = osgDB::getFileExtension(fileName);
|
||||
std::string ext = osgDB::getLowerCaseFileExtension(file);
|
||||
if (!acceptsExtension(ext)) return ReadResult::FILE_NOT_HANDLED;
|
||||
|
||||
std::string fileName = osgDB::findDataFile( file );
|
||||
if (fileName.empty()) return ReadResult::FILE_NOT_FOUND;
|
||||
|
||||
// options
|
||||
char buf[256];
|
||||
int version=0;
|
||||
|
||||
Reference in New Issue
Block a user