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

Reply via email to