Hello Paul and Robert,

Just wanted to bump this on the list again. Seems like it might have slipped through the cracks.

Doug

On Dec 16, 2009, at 12:57 PM, Paul Martz wrote:

Hi Robert and all --

As you know, I have a private nodekit that uses the .osgb extension. In order to avoid collisions with the upcoming new OSG binary format, I've added a static initializer to the nodekit to force load my .osgb plugin. As we've discussed previously, this is what I need to do to avoid forcing client apps to do this explicitly, right?

My nodekit depends on osgWorks, which contains a plugin that supports the .skel extension. So, just to be safe and avoid possible future collisions with the ".skel" extension, I also added a static initializer to osgWorks to force loading the .skel plugin.

The net effect is that whenever my .osgb plugin gets loaded, my osgWorks .skel plugin also gets loaded. This is correct and expected behavior.

Unfortunately, this breaks "osgconv --format osgb". Issuing that command incorrectly displays output for both my .osgb and .skel plugins. It should display only output for the .osgb plugin.

The root cause appears to be flawed login in osgDB::queryPlugin(). This function is passed a plugin filename, which it loads, and then assumes that any plugins that got loaded must be appropriate to query. This is a false assumption in the presence of static initializers, as I describe above.

My personal preference would be to enhance Registry to handle multiple plugins that support multiple formats with the same extension, thus avoiding the need to preload plugins, as I have mentioned in other posts. But if this is still off the table, then my fallback solution would be to change pluginQuery so that it takes an extension as a parameter, and only queries a loaded plugin if it accepts the extension.

Do either of these sound acceptable? If so, let me know which one and I'll code it up.
--
Paul Martz
Skew Matrix Software LLC
_http://www.skew-matrix.com_ <http://www.skew-matrix.com/>
+1 303 859 9466

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to