Hello Marcus,

Marcus Lindblom wrote:
>>> 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().
> 
> Ok. There's no other way to dump a FC to disk in a simple manner?
> (I only need this for caching, not for version-reslient storage)

hm, you can also use the copyToBin()/copyFromBin functions directly 
(those are the ones that the OSB writer/loader ultimately uses to 
serialize the fields).
The BinaryDataHandler argument to those functions should probably be 
something similar to OSBElementBase::Binary{Read,Write}Handler so that 
you can interface it with a std::{i,o}stream.
I don't think we have something that is usable in a more out-of-the-box 
fashion, a bit of boilerplate code is needed for both approaches, but 
you can probably pick a good chunk of it from the OSB IO code.

        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