Introduced a _specverson to centralizer the control of this variable

This commit is contained in:
Robert Osfield
2018-03-15 16:12:40 +00:00
parent d365a6a347
commit 0308dfecf5
2 changed files with 7 additions and 3 deletions

View File

@@ -32,6 +32,7 @@
#define SERIALIZER() OpenThreads::ScopedLock<OpenThreads::ReentrantMutex> lock(_serializerMutex)
osgDB::ReaderWriter::ReadResult
ReaderWriterDAE::readNode(std::istream& fin,
const osgDB::ReaderWriter::Options* options) const
@@ -66,7 +67,7 @@ ReaderWriterDAE::readNode(std::istream& fin,
{
bOwnDAE = true;
#ifdef COLLADA_DOM_2_4_OR_LATER
pDAE = new DAE(NULL,NULL,"1.4.1");
pDAE = new DAE(NULL,NULL,_specversion);
#else
pDAE = new DAE;
#endif
@@ -144,7 +145,7 @@ ReaderWriterDAE::readNode(const std::string& fname,
{
bOwnDAE = true;
#ifdef COLLADA_DOM_2_4_OR_LATER
pDAE = new DAE(NULL,NULL,"1.4.1");
pDAE = new DAE(NULL,NULL,_specversion);
#else
pDAE = new DAE;
#endif
@@ -241,7 +242,7 @@ ReaderWriterDAE::writeNode( const osg::Node& node,
{
bOwnDAE = true;
#ifdef COLLADA_DOM_2_4_OR_LATER
pDAE = new DAE(NULL,NULL,"1.4.1");
pDAE = new DAE(NULL,NULL,_specversion);
#else
pDAE = new DAE;
#endif

View File

@@ -13,6 +13,8 @@ class ReaderWriterDAE : public osgDB::ReaderWriter
public:
ReaderWriterDAE()
{
_specversion = "1.4.1";
// Collada document
supportsExtension("dae","COLLADA 1.4.x DAE format");
// Collada zip archive (contains one or more dae files and a manifest.xml)
@@ -48,6 +50,7 @@ public:
private:
mutable OpenThreads::ReentrantMutex _serializerMutex;
const char* _specversion;
};
///////////////////////////////////////////////////////////////////////////