Dirk Reiners wrote: > Hi Christoph, > > Christoph Fünfzig wrote: > >> Yes, I think, this is a natural generalization. The istreamhandler could >> also create a local temporary if required >> and do some bookkeeping, which files have been accessed for a scene. >> >> > the problem is for it to figure out what else to download. I don't have > a good, general solution for that, unless it is used to open the file. > Are you trying to be able download everything including referenced file before starting the parse? Or am I not understanding you correctly?
If not, why not just override every referenced file-lookup and provide the context (the location of the 'top' file) . Perhaps the context should arrive with the istream, so that a loader can change the context/base-URL if it wants to? >> [snip] >> I do not know if it is worth it to redirect or to emulate plain Cs FILE* >> behaviour (like downloading >> the required file to a local temporary and then open as a FILE* ..). >> Without a virtual file system approach those loaders would always >> require modification. >> >> > I think it should work easily for all the image loaders. Either we > change them to iostream (HDR), or they have facilities to read from > abstract data source anyway (JPG, PNG). We can probably cover/convert > all the stuff that we have in FileIO like 3DS relatively well. Where we > get into trouble are things that use external libraries for loading, > like Inventor or Performer. But for those I don't think there is > anything we can do, but it might make sense to have a fallback mechanism > that at least downloads the main file and runs the loader on it. > Doesn't all loaders use iostreams anyway today? I belive it was changed in 1 a while ago. Since we were discussion a file-cache also... wouldn't that might provide a good solution to external libraries which can only load from a local file? >> With istreams it seems easier. The library boost.asio pointed out by >> Allen seems to fit in nicely here >> with boost.iostreams. >> I need to get some practice with it. >> Currently, there are some loaders which open additional streams during >> loading besides the one passed in. >> >> > Only the model loaders, and for those I don't see away around it, honestly. > But there's no conflict in allowing that, is there, as long as they use the right framework? /Marcus ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
