Hi Rui,

Thanks for the changes.  I am wondering if perhaps we need something a
bit more flexible.  Specially what I am thinking about if one using
multiple 3rd party SDK's within one file, such as OSG, osgEarth, user
custom extensions, each of these has the potential for rev'ing their
own extensions.  Would it be appropriate to have some form of SDK
number that identifies the library that sources the extensions then
the version number for this SDK?

Robert.

On 25 August 2012 15:50, Wang Rui <[email protected]> wrote:
> Hi Robert,
>
> This patch includes the user-custom version of osgDB serializers,
> which allows users to set a custom version number will writing
> osgt/osgb/osgx files, and use it along with the OSG soversion to
> control the schema of serializers. The osgDB/Serializer header now has
> a new macro named UPDATE_TO_USER_VERSION(), which could be used
> together with UPDATE_TO_VERSION(). For example:
>
> REGISTER_OBJECT_WRAPPER( Geode, ... )
> {
>     ADD_USER_SERIALIZER( Drawables );  // origin ones
>
>     UPDATE_TO_USER_VERSION( 1 )  // the user-customized version number
>     {
>         ADD_USER_SERIALIZER( Test );  // a serializer added from version 1-xx
>     }
>
>     UPDATE_TO_USER_VERSION( 2 )  // the user-customized version number
>     {
>         REMOVE_SERIALIZER( Test );  // a serializer removed from version 2-xx
>     }
> }
>
> Please note that when UPDATE_TO_USER_VERSION and UPDATE_TO_VERSION are
> used together, the former will have the priority. That means no matter
> what the soversion is, the user version will always be considered
> first to select corresponding serializers. Default user version is 0,
> so no worry about the backward comparability.
>
> In application level, there is a new option UserVersion=<number> for
> both readers/writers. The user version will be written to file if we
> call writeNodeFile() with the option string like "UserVersion=1" and
> automatically used for comparison while reading again. But if we
> specify the UserVersion option forcibly when reading the scene, the
> input user version will replace the one read from file for special
> purpose.
>
> Cheers,
>
> Wang Rui
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to