Hi Vincent,

On 14/5/09 10:44 AM, Vincent Bourdier wrote:
I've just spent some hours running into the osgDB code, and some littles
things are more clear but there is the big question I cannot answer :

The method
DynamicLibrary::PROC_ADDRESS DynamicLibrary::getProcAddress(const
std::string& procName)

is for me the only one which the loader must use each time a plugin dll
have to be loaded.
But, there is no utilization, at no place ! So how can the osgDB core
find the good methods in the dLL without using this method ?
I'm not a c++ master, but for now, I feel lost in the c++ myst ...

Interesting questions!
Reader/Writers create a static instance osgDB::RegisterReaderWriterProxy<CLASS> in their implementation (look for the REGISTER_OSGPLUGIN macro, defined in osgDB/Registry).

This static is automatically create when the plugin is loaded. The RegisterReaderWriteProxy constructor creates an object of the appropriate class (such as ReaderWriterOBJ) and adds it to the Registry singleton.

So no call to getProcAddress() is necessary.

Hope this helps.
Cheers,
/ulrich
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to