Hi Robert,

imagine the following situation:
- there is a file earth.ive somewhere in the search path
- run "osgviewer http://www.openscenegraph.org/data/earth_bayarea/earth.ive";

What will happen is that the local file earth.ive is loaded instead of the URL.
IMHO this is a bug.

The bug is caused by the behaviour of osgDB::Registry::read(const ReadFunctor& 
readFunctor).

What this does is (at each step returning if successful):
- check if the filename is an archive; if yes, load it
- check if the filename can be loaded with one of the existing plugins
- load the proper library for filename and try that
- if that fails and the filename is a URL, try the CURL plugin

What it *should* do to work properly is the following:
- (check if the filename is an archive; if yes, load it)
- if the filename is a URL, try the CURL plugin
- find (load if necessary) the proper library for filename and try that

About the archives I'm not sure. Strictly speaking they too should be checked after the URL check but I'm not sure to what extent they support being streamed.

Attached is a patch that implements the outlined behaviour.
I've checked it with the earth.ive online database (with and without local 'earth.ive' file present), a local .osga paged database, and various other models, also in combination (for example with the online database and the local database side-by-side).

Please have a look and tell me what you think.
Cheers,
/ulrich

Attachment: Registry.cpp.gz
Description: GNU Zip compressed data

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

Reply via email to