Hi Lionel, I'm not clear on what you are looking for, in terms of further information, or functionality.
The OSG's SO version is currently used to version the .osgb, .osgt and .osgx file formats. Does this help you? When implementing your own wrappers it probably best to just look at the how similar classes to yours are serialized with the src/osgWrappers/serializer/*/*.cpp files. There are quite a few macros that make it easy to wrap basic types, such floats, int, strings, etc. Serialization of UserData is also supported - all you need to do is subclass from osg::Object and implement the wrappers. Robert. On 23 March 2015 at 09:47, Lionel Lagarde <[email protected]> wrote: > Hi, > > Better late than never, I'm writing the serializers of my own classes > for the osgt, osgb... file formats. > > Theses classes exist for a long time, they have evolved a lot. Both the > interfaces > and the implementations have changed. > > I try to make a loader that is able to load the files written using a > previous > version of the software. Of course, because the osg{t,b...} support is > new, a new > format will not appear soon but I want to foresee this case. > > In the deprecated osg and ive reader writer, because the read and write > procedure were > functions, I was able to read a version number, and according to it, read > the right > parameters and build the class using the right methods. > > Because the members of the classes are now loaded independently from each > other, it is now > a little bit more complicated. I'm planning to make my own serialization > classes (TemplateSerializer, PropByValSerializer...) that are able to read > the > current version number, read the ''thing'' if needed, and store it > somewhere. > Using a FinishedObjectReadCallback, I should be able to build correctly > the classes. > > Right now I'm looking for a reading state structure. This structure has to > be > readable/writable by all the serializer classes. Maybe the user data of > the node > is the right place. > > Does someone has already faced a similar problem? If so, how you resolved > it? > I don't know well the new serialization scheme, maybe there is a better > solution? > > Any clue? > > Lionel Lagarde > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

