Andreas Zieringer wrote: > Hi Marcus, > >> I was of course changing too much at once, so I never figured that was >> what broke it. Because, if the cache-load fails, it loads the vrml >> instead (with some complaints in the log) so I didn't spot it when I >> made that change. >> >> Not that I know a lot about iostreams, but can't you use tellp() to get >> the current position? Or do you seek to the end to see how long the >> stream is? >> > > yes I use tellg for the current position but I need to seek to the end > for calculating the stream length. > Ok. Hm. Since I know the stream length beforehand (I did save it once) I do not need that. I'll see if I can layer some kind of byte-counter on the istream object sent to OpenSG, so that I can get the current position only (without invoking your progresscb, so no seek). Given that you can quite easily check the size of a file (with boost::filesystem f.ex.), such a thing might work pretty well as something to plug into SFH's progress system. (i.e, if you pass an istream, you may also pass an explicit size, which is what the read(filename)-function would call).
Since people are starting to stream stuff more, providing an alternative to the seek() might be a good idea. Does the above make any sense? /Marcus ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
