I'm new to collada and I'm having some trouble with the geometry integration sample (from the programming giude).
My problems start very early on, and they appear to be initialisation issues...
I'm sure I've missed something from the programming giude, but I'm not sure what.
Here's what happens:
I start by calling intRegisterElements(), which then calls intGeometry::registerElement()
(all the other XXX::registerElements() methods have been commented out since I only need geometry for now).
Right after this, I get a segmentation fault trying to access a NULL pointer.
This happens in
if ( _Meta != NULL ) return _Meta;
_Meta = new daeMetaElement;
_Meta->setName( "geometry" );
It sees _Meta as NULL (the intGeometry _Meta) and it news it.
Then when it tries to do
it bombs out because the domGeometry _Meta is NULL.
I've looked through the code and saw that the domGeometry::_Meta gets newed by domGeometry::registreElement().
QUESTION 1: Where should this get called from? Is there some sort of initialisation code I need to run before I can use any of this?
QUESTION 2: After I call "new DAE" for my daeObject, do I need to call daeObject->setDatabase(0) ? I've noticed that to get to the geometry of my object after it's been loaded, I need to go through the database...I'm assuming creating the default one (by passing NULL) should be ok, right?
Thx in advance for any help,