Stephan,
I've re-organized my application to match your layout as best I can. It
appears that I've built a debug build, rather than a release build. I haven't
been able to figure out how to make a release build using XCode 5 (This begs
the question: What version of XCode and MacOS X are you using?).
One issue I'm running into is that I cannot step and trace anything within the
OSG library. I'm pretty sure that it's because the modification dates between
the library as built, and as copied into my application bundle are different.
As far as I can tell both the OSG framework and the plugins are loading
correctly - Still, reading a .OSG file doesn't work.
I think the error messages are a bit of a red herring - I added trail of bread
crumbs (printf statements) so I could see what's happening.
> FindFileInPath() : USING
> /Users/raldrich/Documents/fu/osgviewercocoa/DerivedData/osgviewercocoa/Build/Products/Debug/osgviewercocoa.app/Contents/PlugIns/osgdb_osgd.so
> Opened DynamicLibrary osgPlugins-3.2.0/osgdb_osgd.so
> LOADED
> LOADED
> Warning: Could not find plugin to read objects from file
> "/Users/raldrich/Documents/fu/OpenSceneGraph/OpenSceneGraph-Data-3.0.0/cessna.osg".
> 2013-11-12 12:33:43.629 osgviewercocoa[85734:303] File:
> /Users/raldrich/Documents/fu/OpenSceneGraph/OpenSceneGraph-Data-3.0.0/cessna.osg
> failed to load
The log entry "Opened DynamicLibrary…" comes from
DynamicLibrary::DynamicLibrary(name, handle), which shouldn't be reachable if
the library doesn't load.
The first "LOADED" log entry comes from Registry::loadLibrary(filename), and
changes to "PREVIOUSLY_LOADED" the second time I try to load a file.
The second "LOADED" log entry comes from Registry::read(readfunctor)
> // now look for a plug-in to load the file.
> std::string libraryName = createLibraryNameForFile(readFunctor._filename);
> if (loadLibrary(libraryName)!=NOT_LOADED)
> {
> printf(" LOADED\r");
> for(;itr.valid();++itr)
> {
> printf(" loop, reading\r");
> ReaderWriter::ReadResult rr = readFunctor.doRead(*itr);
> if (readFunctor.isValid(rr)) return rr;
> else results.push_back(rr);
> }
> }
> else
> {
> printf(" NOT_LOADED\r");
> }
The "Warning: Could not find plugin…" is a misnomer - The warning is generated
if the model couldn't be read, regardless of why.
Here's the interesting bit though - you'll notice that I added "printf("
loop, reading\r");" inside the read loop, and it's never being reached. I have
no idea why, except that itr.valid must be returning false.
Any ideas?
TIA,
Ron Aldrich
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org