When the Collada plugin was first written it used to create and delete a
local DAE object for each read or write operation.

 

At SVN changeset 5572 Per Fahlberg changed the behaviour so that a single
DAE object was created at first use and held onto until the plugin was
unloaded. This change was to fix crashes in the Collada library when it was
used more than once. I believe that these crashes have now been resolved in
the latest release of the collada DOM library, so this change could be
removed.

 

At SVN changeset 7504 Mattias Linde made a further change to allow a pointer
to a DAE object to be passed into and out of the plugin. If pointer was
passed in it would be used instead of any internally allocated object, and
in all circumstances a pointer to the DAE object actually used would passed
back out on completion.

 

I have recently been investigated some issues regarding the use of collada
when two or more DAE objects are in existence at the same time. This has
uncovered a problem with the collada library which is unlikely to be
resolved in the short term. 

 

https://sourceforge.net/forum/forum.php?thread_id=1871237
<https://sourceforge.net/forum/forum.php?thread_id=1871237&forum_id=531264>
&forum_id=531264

 

Because of this I think it is better that the collada plugin does not hold
onto any dae objects. I suggest that the behaviour is changed as follows: -

 

On entry if a DAE object is supplied then use it otherwise allocate a new
one. On exit do not pass back any pointers to the DAE object and if an
internally allocated object has been used then delete it. Has anyone got any
comments on this, especially Per, Mattias and Robert?

 

I also propose to change the way the filename field is handled on input and
output. This will always be treated as if it was a filename path in the
current platform format, so the behaviour will be the same as other plugins.
Before it is passed to the collada library it will be resolved to an
absolute pathname in the current platform format using OSG's search
algorithms as required (input only I think) and then converted to a file URI
in a format accepted by the collada library. Once again has anyone got any
comments on this.

 

I madness takes me completely I will also put in some fixes for transparent
texture handling and Google compatibility on output that I have been working
on.

 

Roger

 

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to