Hi All, Very spooky. I'm looking at this myself right now, and I'm not so sure that its right to say that OSG should ripple through its loaded plugins, and if they fail to load the file, to then try the CURL plugin if its a server address. The issue is that if you are doing this 100's of times (lots of models in your scene all held on a server) and you simply want to let OSG handle loading, then you are going to be checking the known plugins everytime, when you already know that you want the Curl plugin to handle it.
Could we have an option that controls whether to delegate all server address files to the CURL plugin ? Neil ---- Jason Beverage <[email protected]> wrote: > Hi Robert and Ulrich, > > Returning an empty string makes sense to me, in osgEarth we explicitly check > for a server base URL and use a separate path to download the config and > parse it, so that should work out find for us. > > Thanks, > > Jason > > On Fri, Jun 5, 2009 at 5:07 AM, Robert Osfield > <[email protected]>wrote: > > > Hi Ulrich and Jason, > > > > On Fri, Jun 5, 2009 at 8:53 AM, Ulrich Hertlein<[email protected]> > > wrote: > > >> It makes sense to me that if the filename contain's a server path that > > >> no local searching should be done within the OSG_FILE_PATH. Would that > > >> just be a simple check in osgDB:;findDataFile to simply return the > > >> filename if the incoming file is a URL or is there more places that need > > >> tweaking? > > > > > > Wouldn't it make more sense to return an empty string (or false, or an > > > exception) if the filename is a URL? The caller needs to know that this > > > isn't a valid filename. > > > > I think the two main options we have are to return an empty string > > from osgDB::findDataFile() or the original string when the input > > string contains a server address. Personally I'd suggest that if > > findDataFile() can't local the file locally then it should return a > > empty string which signifies failure to find the file. If we don't > > return an empty string then plugins that can't handle http will try to > > open the URL and fail. > > > > If a plugin is able to handle server protocols then they won't be > > using findDataFile(). > > > > Robert. > > _______________________________________________ > > osg-submissions mailing list > > [email protected] > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > > _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
