I am working on a project right now were I need to create a proprietary
loader for OpenSG (ie. the loader can not be compiled into OpenSG and is
not OpenSource). I was hoping/planning to compile it as a standalone
shared object and then use OpenSG's file loading mechanisms to
dynamically find the loader and initialize it at runtime.
Unfortunately, I discovered yesterday that OpenSG does not yet support
independent loader libraries.
From what I understand, the only way to do something similar to this
right now is to link the end user applications explicitly against my
loader library. While this will work for applications that I create, it
is not as flexible as I would like because I would like my users to be
able to use the loader for pre-existing OpenSG application (for example
the osgSceneViewer that comes with the distrib).
What I would like to see in OpenSG is something similar to Performer and
OSG where there is a loader/plugin path that points to directories where
loaders/plugins can be found for the scene graph. Then when a user
tries to open up a file like "myfile.custom" the scene loader code would
search the path for a shared library like "opensgLoader_custom.so" or
something similar to that.
Are there any plans to add something like this to OpenSG in the near
future? Does anyone have code sitting around that already implements
something like this? What exactly would it take to implement a solution
like this in OpenSG?
Thanks,
Allen
Hi Allen,
adding something like this is quite easy. What about a new global
setPluginPath() method and a OSG_PLUGIN_PATH envar. In osgInit it just
looks for all dll/so's in the plugin path and loads them via
dlopen/LoadLibrary. I wouldn't distinguish between different plugin
types just load all.
Any comments?
Andreas
--
Andreas Zieringer [EMAIL PROTECTED]
Fraunhofer IGD - A4 phone +49 (0)6151 155 289
Fraunhoferstr. 5 fax +49 (0)6151 155 196
D-64283 Darmstadt www.igd.fhg.de/www/igd-a4
-------------------------------------------------------
SF.Net email is sponsored by: GoToMeeting - the easiest way to collaborate
online with coworkers and clients while avoiding the high cost of travel and
communications. There is no equipment to buy and you can meet as often as
you want. Try it free.http://ads.osdn.com/?ad_id=7402&alloc_id=16135&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users