Hi Robert and Renaud,

Sorry for the delay. I have just finished one of my client work and
uploaded some pictures at www.openscenegraph.com (Gallery - Use cases -
City of Xining). Hope someone would enjoy it. :-)

Current serialization mechanism doesn't support writing to previous
versions. And as Robert mentioned, we can implement such feature by
customizing the version number of OutputStream while writing to files. This
functionality will be submitted along with the alterable versioning
mechanism soon, maybe this weekend.

Thanks,

Wang Rui




2013/3/26 Robert Osfield <robert.osfi...@gmail.com>

> Hi Renaud,
>
> I haven't ever tried forcing the serializes to write to an old
> version, Wang Rui is the original author so to answer the question I
> have to dig into the code.  Looking at src/osgDB/OutputStream.cpp is
> curerntly hardwired to write out the current OSG version:
>
>         *this << PROPERTY("#Version") << (unsigned
> int)OPENSCENEGRAPH_SOVERSION << std::endl;
>
> So for now I don't think there is a way and to provide a solution
> would require modifications to the source code.  My first thought
> would be perhaps one could have a so OutputStream version member
> variable default to OPENSCENEGRAPH_SOVERSION but allow this to be
> overwridden then use this when writing out version and selecting which
> wrappers to use in the ObjectWrapper.cpp.
>
> I know that Rui has been thinking about introducing a more flexible
> versioning scheme for the serializers so perhaps this capability could
> be worked into this work.  He has recently mentioned that he's too
> busy with other work to get back to this right now but once he gets a
> quieter spell he come back to it.
>
> Robert.
>
> On 28 February 2013 19:12, Renaud Paris <renaud.keri...@free.fr> wrote:
> > Hi,
> >
> > I've just spent some times on understanding serialization and versioning
> > in wrappers. As far as I understand, you can read files written by
> previous versions. But is there a way to write as if it was written by a
> previous version?
> >
> > Do I miss something? Would it be a wrong idea to force version before
> writing and to modify ObjectWrapper::write to use either
> OPENSCENEGRAPH_SOVERSION or the wrapper version in order to select a
> > serializer or not?
> >
> > Thank you!
> >
> > Cheers,
> > Renaud
> >
> > ------------------
> > Read this topic online here:
> > http://forum.openscenegraph.org/viewtopic.php?p=52910#52910
> >
> >
> >
> >
> >
> > _______________________________________________
> > osg-users mailing list
> > osg-users@lists.openscenegraph.org
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to