From Stephan Huber, "attached you'll find the missing readObject-implementations for the imageio-plugin as suggested by Remo Eichenberger."

This commit is contained in:
Robert Osfield
2013-06-21 13:41:03 +00:00
parent cb09fff797
commit da134aa8ed

View File

@@ -254,7 +254,7 @@ osg::Image* CreateOSGImageFromCGImage(CGImageRef image_ref)
{
/* This code is adapted from Apple's Documentation found here:
* http://developer.apple.com/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/index.html
* Listing 9-4††Using a Quartz image as a texture source.
* Listing 9-4Using a Quartz image as a texture source.
* Unfortunately, this guide doesn't show what to do about
* non-RGBA image formats so I'm making the rest up
* (and it's probably all wrong).
@@ -1295,6 +1295,16 @@ public:
#endif
}
virtual ReadResult readObject(std::istream& fin,const osgDB::ReaderWriter::Options* options =NULL) const
{
return readImage(fin, options);
}
virtual ReadResult readObject(const std::string& file, const osgDB::ReaderWriter::Options* options =NULL) const
{
return readImage(file, options);
}
};
// now register with Registry to instantiate the above