On 9/1/2011 9:27 AM, Joseph Louis wrote:
Hello Wang!
First of all, let me congratulate you on the book! It does an excellent job of
explaining the core concepts of OSG and is a pleasure to read. Thank you for
your quick reply. I realized that I had named it osgdb_tri.dll instead of
osgdb_trid.dll. It worked in the latter case as I am running the program in
debug mode. So, I guess there is no need to use CMake, atleast for this case.
Regardless of whether you're building a plugin or not, there is no need to use
CMake for any project that depends on OSG; there are several solutions for
multiplatform builds.
As far as registering your plugin goes, you should include a static in your
library, initialized during load, that registers the plugin with the osgDB. This
ensures the chain of responsibility design pattern behaves as intended. The
REGISTER_OSGPLUGIN macro (defined in the osgDB/Registry header) will do this for
you.
If you are building static instead of dynamic, you need to take some specific
steps to make sure your static plugin is included in the executable. See the
USE_OSGPLUGIN (again: osgDB/Registry) and the osgstaticviewer example.
-Paul
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org