Added support for ReadResult and WriteResult to the osgDB::ReaderWriter
to allo plugins to pass back more information about the success or failure of a file load. All plugins have been updated to the new convention.
This commit is contained in:
@@ -290,7 +290,7 @@ class ReaderWriterBMP : public osgDB::ReaderWriter
|
||||
virtual const char* className() { return "BMP Image Reader"; }
|
||||
virtual bool acceptsExtension(const std::string& extension) { return extension=="bmp"; }
|
||||
|
||||
virtual osg::Image* readImage(const std::string& fileName, const osgDB::ReaderWriter::Options*)
|
||||
virtual ReadResult readImage(const std::string& fileName, const osgDB::ReaderWriter::Options*)
|
||||
{
|
||||
|
||||
unsigned char *imageData = NULL;
|
||||
@@ -300,7 +300,7 @@ class ReaderWriterBMP : public osgDB::ReaderWriter
|
||||
|
||||
imageData = bmp_load(fileName.c_str(),&width_ret,&height_ret,&numComponents_ret);
|
||||
|
||||
if (imageData==NULL) return NULL;
|
||||
if (imageData==NULL) return ReadResult::FILE_NOT_HANDLED;
|
||||
|
||||
int s = width_ret;
|
||||
int t = height_ret;
|
||||
|
||||
Reference in New Issue
Block a user