Added prelimarny support for reading archives via the .net plugin

This commit is contained in:
Robert Osfield
2004-11-13 16:21:48 +00:00
parent 06f1b602e7
commit ddb0d6bd4f
10 changed files with 75 additions and 17 deletions

View File

@@ -39,6 +39,18 @@ public:
return archive.get();
}
/** open an archive for reading.*/
virtual ReadResult openArchive(std::istream& fin,const Options*)
{
osg::ref_ptr<OSGA_Archive> archive = new OSGA_Archive;
if (!archive->open(fin))
{
return ReadResult(ReadResult::FILE_NOT_HANDLED);
}
return archive.get();
}
virtual ReadResult readImage(const std::string& file,const Options* options)
{
ReadResult result = openArchive(file,osgDB::Archive::READ);