Refactored the handling of readImage/writeImage/readObject/writeObject to avoid double setting of unique ID's, fixing the problem in reading/writing files with images
This commit is contained in:
@@ -137,6 +137,7 @@ public:
|
||||
osg::PrimitiveSet* readPrimitiveSet();
|
||||
osg::Image* readImage();
|
||||
osg::Object* readObject( osg::Object* existingObj=0 );
|
||||
osg::Object* readObjectFields( const std::string& className, osg::Object* existingObj=0);
|
||||
|
||||
ReadType start( InputIterator* );
|
||||
void decompress();
|
||||
|
||||
@@ -146,6 +146,7 @@ public:
|
||||
void writePrimitiveSet( const osg::PrimitiveSet* p );
|
||||
void writeImage( const osg::Image* img );
|
||||
void writeObject( const osg::Object* obj );
|
||||
void writeObjectFields( const osg::Object* obj );
|
||||
|
||||
void start( OutputIterator* outIterator, WriteType type );
|
||||
void compress( std::ostream* ostream );
|
||||
@@ -161,8 +162,8 @@ protected:
|
||||
template<typename T>
|
||||
void writeArrayImplementation( const T*, int write_size, unsigned int numInRow=1 );
|
||||
|
||||
unsigned int findOrCreateArrayID( const osg::Array* array );
|
||||
unsigned int findOrCreateObjectID( const osg::Object* obj );
|
||||
unsigned int findOrCreateArrayID( const osg::Array* array, bool& newID );
|
||||
unsigned int findOrCreateObjectID( const osg::Object* obj, bool& newID );
|
||||
|
||||
ArrayMap _arrayMap;
|
||||
ObjectMap _objectMap;
|
||||
|
||||
Reference in New Issue
Block a user