While trying osgEarth (great work by the way), I find a OSG problem.
osgEarth works correctly with osgviewer but not with our own viewer.
After some investigations with the debugger, it was because we are
loading a png file before loading the earth file.
And then when osgEarth try to load distant png files, it calls the
method osgDB::Registry::read. It tries first to load with existing
loaded plugins.
So it tries with osgdb_png plugin that returns a FILE_NOT_FOUND.
Finally, the method returns a FILE_NOT_FOUND because the curl plugin is
not yet loaded and will never be... the code to load it is just after
the FILE_NOT_FOUND return...
Surely, other image plugin have the same behavior, it is not only a png
problem.

I have made a small modification to osgviewer to reproduce the problem,
just loading a png file at line 46. With this line, loading
google_maps.earth does not work, comment it and then it works...

I think of different ways to fix that:
 - modify the Registry::read method to handle file with server adress
differently
 - modify each image plugin to return a FILE_NOT_HANDLED when the file
name contains server adress
 - force to load the curl plugin at the start somewhere in my code... or
maybe in osgDB

Not sure which is the best?

Fabien Lavignotte

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

Attachment: osgviewer.cpp
Description: osgviewer.cpp

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to