Further updates to the ReaderWriter support in osgDB, and a fix to a small warning
in Matrix.cpp.
This commit is contained in:
@@ -11,17 +11,26 @@ using namespace osgDB;
|
||||
|
||||
Object* osgDB::readObjectFile(const std::string& filename)
|
||||
{
|
||||
return Registry::instance()->readObject(filename);
|
||||
ReaderWriter::ReadResult rr = Registry::instance()->readObject(filename);
|
||||
if (rr.validObject()) return rr.takeObject();
|
||||
if (rr.error()) notify(WARN) << rr.message() << endl;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Image* osgDB::readImageFile(const std::string& filename)
|
||||
Image* osgDB::readImageFile(const std::string& filename)
|
||||
{
|
||||
return Registry::instance()->readImage(filename);
|
||||
ReaderWriter::ReadResult rr = Registry::instance()->readImage(filename);
|
||||
if (rr.validImage()) return rr.takeImage();
|
||||
if (rr.error()) notify(WARN) << rr.message() << endl;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Node* osgDB::readNodeFile(const std::string& filename)
|
||||
Node* osgDB::readNodeFile(const std::string& filename)
|
||||
{
|
||||
return Registry::instance()->readNode(filename);
|
||||
ReaderWriter::ReadResult rr = Registry::instance()->readNode(filename);
|
||||
if (rr.validNode()) return rr.takeNode();
|
||||
if (rr.error()) notify(WARN) << rr.message() << endl;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user