Okay, this is starting to worry me. This is all supposed to work out of the box.
I've noticed a similar problem. The /Library/... path is not set by
default.
I have solved this problem by putting the following near the top of
main():
#ifdef __APPLE__
osgDB::FilePathList pluginPaths;
pluginPaths.push_back( "/Library/Application Support/OpenSceneGraph/PlugIns"
);
osgDB::Registry::instance()->setLibraryFilePathList( pluginPaths );
#endif
No, this should all be set up already without you having to do
anything. There's a ton of code we added to osgDB/FileUtils.cpp that
does all this already. This code was written several years ago and I
don't think it has been touched since. The code is actually a bit
smarter because it queries the system for the Application Support
directory. I learned that the Application Support directory can be
changed by users.
I put the plugins in:
/Library/Frameworks/PlugIns or in ~/Library/Frameworks/PlugIns
The frameworks are in the same place as you have them.
I forgot why this one works. Officially we tell people to use:
/Library/Frameworks/Application Support/OpenSceneGraph/PlugIns (or ~/...)
We put in some redundancy early on which I think why
/Library/Frameworks/PlugIns works, but these paths are not the ones we
advertise.
Works fine for me, without setting LD_LIBRARY_PATH (I've been using
the app.bundles from the Xcode projects)
Btw . LD_LIBRARY_PATH is hardly used on OS X . you should use
DYLD_LIBRARY_PATH . then it would work just like you expect . but copying is
the cleaner solution I think J
You shouldn't have to set (DY)LD_LIBRARY_PATH or any other
environmental variables (sans one for the Intel/ATI bug). The whole
motivation for our FileUtils.cpp patch was so we could leave
environmental variables behind.
ps. on the intel mac there's a bug in the ati driver that creates
crashes when rendering font files loaded from the disk.
Yes, I documented this fairly extensively in the OSX_OSG_README.rtf file.
With the framework version I placed the Frameworks in "/Library/Frameworks"
and PlugIns in "/Library/Application Support/OpenSceneGraph/PlugIns". This
failed to find the plugins the same way as when I compiled myself.
So are you saying the prebuilt binaries work for you, but when you
compile yourself, it does not? Compiling it yourself shouldn't really
matter. Are you using the Xcode projects or Makefiles? This shouldn't
really matter either for plugins. The difference is the latter builds
.dylibs instead of frameworks, but this doesn't affect plugin loading
which is controlled by osgDB. (Just don't mixup the two plugins,
because they link to different libraries (dylibs or frameworks)).
Are you using the standard Apple gcc toolset? The code base relies on
__APPLE__ being defined by the compiler. If this is not being defined
by your compiler, then building OSG is going to miss out on pretty
much all the Apple specific code paths.
-Eric
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/