Implemented missing Archive::readShader/writeShader, and added searching of the archive list in Registr::read() so that files
that are stored in the archives can be found.
This commit is contained in:
@@ -66,11 +66,13 @@ class OSGDB_EXPORT Archive : public ReaderWriter
|
||||
virtual ReadResult readImage(const std::string& /*fileName*/,const Options* =NULL) const = 0;
|
||||
virtual ReadResult readHeightField(const std::string& /*fileName*/,const Options* =NULL) const = 0;
|
||||
virtual ReadResult readNode(const std::string& /*fileName*/,const Options* =NULL) const = 0;
|
||||
virtual ReadResult readShader(const std::string& /*fileName*/,const Options* =NULL) const = 0;
|
||||
|
||||
virtual WriteResult writeObject(const osg::Object& /*obj*/,const std::string& /*fileName*/,const Options* =NULL) const = 0;
|
||||
virtual WriteResult writeImage(const osg::Image& /*image*/,const std::string& /*fileName*/,const Options* =NULL) const = 0;
|
||||
virtual WriteResult writeHeightField(const osg::HeightField& /*heightField*/,const std::string& /*fileName*/,const Options* =NULL) const = 0;
|
||||
virtual WriteResult writeNode(const osg::Node& /*node*/,const std::string& /*fileName*/,const Options* =NULL) const = 0;
|
||||
virtual WriteResult writeShader(const osg::Shader& /*shader*/,const std::string& /*fileName*/,const Options* =NULL) const = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -572,6 +572,8 @@ class OSGDB_EXPORT Registry : public osg::Referenced
|
||||
// forward declare helper class
|
||||
class AvailableReaderWriterIterator;
|
||||
friend class AvailableReaderWriterIterator;
|
||||
class AvailableArchiveIterator;
|
||||
friend class AvailableArchiveIterator;
|
||||
|
||||
|
||||
osg::ref_ptr<FindFileCallback> _findFileCallback;
|
||||
@@ -584,6 +586,9 @@ class OSGDB_EXPORT Registry : public osg::Referenced
|
||||
ImageProcessorList _ipList;
|
||||
DynamicLibraryList _dlList;
|
||||
|
||||
OpenThreads::ReentrantMutex _archiveCacheMutex;
|
||||
ArchiveCache _archiveCache;
|
||||
|
||||
bool _openingLibrary;
|
||||
|
||||
// map to alias to extensions to plugins.
|
||||
@@ -605,8 +610,6 @@ class OSGDB_EXPORT Registry : public osg::Referenced
|
||||
ObjectCache _objectCache;
|
||||
OpenThreads::Mutex _objectCacheMutex;
|
||||
|
||||
ArchiveCache _archiveCache;
|
||||
OpenThreads::Mutex _archiveCacheMutex;
|
||||
|
||||
ArchiveExtensionList _archiveExtList;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user