[osg-users] Meta-data in core OSG - project started
jean-sebastien.guay at cm-labs.com
Fri Apr 15 08:11:21 PDT 2011
> Actually I hoped someone would help us on the serialization subject! And yes, I guess new serializers may help.
I think so, I haven't used them that much but from the description they
seem simple to use, and as long as the class you want to save is
serializable then when the osg::Object serializes itself it can
serialize all its metadata at the same time.
> But what about formats supporting metas? It may be helpful to add somewhere a callback/serializer/anything, which may be called by plugins to convert from/to a string representation when not handled natively. No?
Ah, so you're talking about saving to formats other than .osgt/.osgb right?
In that case perhaps the same serializers can be used to serialize the
metadata, and then put that in a string inside metadata of the other
format file. And then when reading you just check if one of the metadata
in the file corresponds to some OSG-serialized data, and deserialize it.
That could work.
And if the format has additional data that OSG doesn't know about, but
which the reader might want to store as metadata in the OSG nodes when
reading the file (like the recent discussion about OpenFlight Surface
Material Codes), the ReaderWriter can easily add metadata when reading too.
But I think perhaps loading/saving metadata to/from OSG-native formats
would be enough for now...
Jean-Sebastien Guay jean-sebastien.guay at cm-labs.com
More information about the osg-users