[osg-users] Fwd: OGR plugin for OSG
robert.osfield at gmail.com
Thu Sep 6 01:07:14 PDT 2007
On 9/5/07, Antoine Hue <tonio_73 at tiscali.fr> wrote:
> Christoph Ehrler wrote:
> > OK it's me again...
> > I started development on the plugin but ran into the following problem:
> > When OSG tries to use the generated osgdb_ogr.dll it fails to open it
> > (DynamicLibrary::failed loading...). When I rename another dll (e.g.
> > osgUtil.dll) OpenSceneGraph succeeds (opened DynamicLibrary...) but
> > can't find the plugin of course.
> I think osgdb_xxx plugins name are hardwired in osgDB's registry.
> If you want your own plugin, you should add it to the osgPlugins-xxx
> directory and make it answer to the file extension you want to open.
Plugin names are not hardwired in osgDB::Registry, there is only an
aliasing of extensions for help map multiple extension names to
plugins of different names.
If you plugin is called the same as your file extension i.e. osgdb_jpg
then it'll be picked up automatically with no need for aliasing.
Alternatively you can preload plugins and the ChainOfResposibility
pattern will ensure that your plugin gets called on each file load.
More information about the osg-users