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:
Robert Osfield
2003-12-08 11:24:43 +00:00
parent 3e7fadb2ec
commit 83bf813e58
41 changed files with 489 additions and 367 deletions

View File

@@ -1,5 +1,6 @@
#include <osgDB/ReaderWriter>
#include <osgDB/FileNameUtils>
#include <osgDB/FileUtils>
#include <osgDB/Registry>
#include "SlideShowConstructor.h"
@@ -442,12 +443,14 @@ void ReaderWriterSS3D::parseSlide (SlideShowConstructor& constructor, xmlDocPtr
return;
}
osgDB::ReaderWriter::ReadResult ReaderWriterSS3D::readNode(const std::string& fileName,
osgDB::ReaderWriter::ReadResult ReaderWriterSS3D::readNode(const std::string& file,
const osgDB::ReaderWriter::Options*)
{
std::string ext = osgDB::getLowerCaseFileExtension(fileName);
if (!acceptsExtension(ext))
return ReadResult::FILE_NOT_HANDLED;
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;