Rick Pingry wrote:
Hi,
I am writing a plugin to handle the "nsm" file type, so my plugin is named "osgdb_nsm(d).dll".
That is working well, but I have found that my customer also uses the extension "csg" for exactly the same
file type. I would like my plugin to be called for the "csg" extension as well.
I call supportsExtension() in the c'tor for both nsm and csg. I also override
acceptsExtension() to handle both csg and nsm. I even made two classes so that
I could have:
REGISTER_OSGPLUGIN(nsm, ReaderWriterNSM)
REGISTER_OSGPLUGIN(csg, ReaderWriterCSG)
all to no avail. None of it gets called on my "csg" file, but my "nsm" file
works fine, presumably because of the filename convention. I figure there must be a way to do
this, since there are the supportsExtension function and virtual acceptsExtension functions. What
am I missing?
In osgDB/Registry.cpp add an alias for "csg" to point to your plugin:
addFileExtensionAlias("csg", "nsm");
--"J"
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org