Hello Marcus,

Marcus Lindblom wrote:
> I'm trying to replicate something I did a few years ago in 1.8, namely 
> caching images (with mipmaps and all) to disk.
> 
> At that time, I used some NFIO class to write FC's to binary, but I 
> can't find which one to use in 2.0. (Everything seems to be about 
> writing scenes with Nodes in them, which I don't want here.)

yes, that is true in general for the scene file io, but for osb it is 
mostly the case at the outermost interface level, internally it just 
sees FieldContainer.

> Where should I be looking?

You probably need to duplicate what OSBDriver::write() does, but instead 
of passing a node to OSBRootElement::preWrite() you pass in your image. 
To make sure you only write out the image, make sure it is not used as a 
texture yet/any more, because the preWrite() follows all pointers from 
the given container to discover what needs to be written.
Reading should similarly follow OSBDriver::read().

        Cheers,
                Carsten

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to