Hi Christian,

Yes, this is possible. Once you have implemented your custom
osgDB::ReaderWriter, you can use the osgDB::RegisterReaderWriterProxy to
globally register the class. For example, if your custom class is named
"MyReaderWriter", just add the following in your source file:

static osgDB::RegisterReaderWriterProxy<MyReaderWriter>
g_MyReaderWriterProxy;

This essentially adds an instance of your custom loader class with the
global osgDB::Registry instance. As long as your class properly implements
the "acceptsExtension" method, your application should now be able to
handle the specified file format.

Cheers,
Farshid


On Wed, Mar 11, 2015 at 10:43 AM, Christian Buchner <
[email protected]> wrote:

> Hi,
>
> let's say I have developed a plug-in to read a specific file format. Is it
> possible to make this plug-in part of the my application binary without
> shipping an additionall DLL in the osgPlugins folder? The rest of OSG
> remains a dynamic build - only that extra plugin is desired to be
> statically linked with my application.
>
> How would I go about registering said plug-in with OSG so it's getting
> used?
>
> Christian
>
>
> _______________________________________________
> 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