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:
Robert Osfield
2001-10-30 14:20:37 +00:00
parent 97e4488d80
commit f0372817b5
23 changed files with 321 additions and 122 deletions

View File

@@ -308,7 +308,7 @@ class ReaderWriterJPEG : public osgDB::ReaderWriter
return osgDB::equalCaseInsensitive(extension,"jpeg");
}
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;
@@ -318,7 +318,7 @@ class ReaderWriterJPEG : public osgDB::ReaderWriter
imageData = simage_jpeg_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;