From Per Fahlberg, "I've fixed the dae plugin so it is only using one instance of the DAE.

The crashes seen earlier are gone, it is now possible to read multiple
.dae files and converting both to and from .dae files."
This commit is contained in:
Robert Osfield
2006-09-15 13:11:00 +00:00
parent fa76f7e973
commit fa791e99b8
5 changed files with 32 additions and 28 deletions

View File

@@ -18,21 +18,17 @@
using namespace osgdae;
daeReader::daeReader()
daeReader::daeReader(DAE *dae_) : dae(dae_),
rootNode(NULL),
m_numlights(0),
currentEffect(NULL),
geometryMap(),
materialMap()
{
dae = new DAE;
m_numlights = 0;
currentEffect = NULL;
}
daeReader::~daeReader()
{
if ( dae )
{
delete dae;
DAE::cleanup();
dae = NULL;
}
}
bool daeReader::convert( const std::string &fileURI )
@@ -70,9 +66,6 @@ bool daeReader::convert( const std::string &fileURI )
}
rootNode = processVisualScene( vs );
delete dae;
DAE::cleanup();
dae = NULL;
return true;
}