OpenSceneGraph/include
Robert Osfield 4044fd5a74 From Wang Rui, "The file attached includes two new features for the serialization IO functionality. First, custom serializer version control should work now, just by defining a new REGISTER_CUSTOM_OBJECT_WRAPPER macro. For example:
// A custom class
namespace CustomDomain {

class MyGroup : public osg::Group
{
public:
    META_Node( CustomDomain, MyGroup );

    void setMyName( const std::string& n );
    const std::string& getMyName() const;

    void setMyID( int id );
    int getMyID() const;

    ...
};

}

// The serialization wrapper using a custom domain name
REGISTER_CUSTOM_OBJECT_WRAPPER( MyDomain,
                                CustomDomain_MyGroup,
                                new CustomDomain::MyGroup,
                                CustomDomain::MyGroup,
                                "osg::Object osg::Node osg::Group CustomDomain::MyGroup" )
{
    ADD_STRING_SERIALIZER( MyName, std::string() );
    {
        UPDATE_TO_VERSION_SCOPED( 1 );  // Updated for a new domain version
        ADD_INT_SERIALIZER( MyID, 0 );
    }
}

Save the class instance as follows:
osgDB::writeNodeFile( *myGroup, "serializer_test.osgt", new osgDB::Options("CustomDomains=MyDomain:1") );

The output file will include the domain version definition and all the class data, and can be read back. We can also force setting the domain version by the CustomDomains option while reading the saved files. If we save the class instance without any options, MyID will be ignored because the default domain version is 0.

This may help third-party libraries like osgEarth to maintain their own serializers without regarding to the OSG soversion changes.

Another feature added is a more robust binary format, which in fact adds a size-offset at each block's beginning. When there are problems or unsupported data types while reading, we can now directly jump to the block end indicated by the offset value. So a .osgb file will automatically ignore bad data and read remains as normal (at present it will fail at all). This feature will not break the backward compatibility, and can be disabled by setting "RobustBinaryFormat=false" while writing out.

Hope these changes can work smoothly with present and future community projects. Maybe we should also consider have an osgserializer example to test and demonstrate all things we can do now."
2013-06-24 08:48:55 +00:00
..
OpenThreads From Piotr Domagalski, "Currently, code using OpenSceneGraph doesn't build with clang due to the way __sync_bool_compare_and_swap() is used in OpenThreads/Atomic header file. 2012-09-06 10:52:28 +00:00
osg Updated version number after dev release 2013-06-21 19:35:56 +00:00
osgAnimation Fixed usage of META_NodeVisitor so it doesn't include "" 2013-01-24 18:48:34 +00:00
osgDB From Wang Rui, "The file attached includes two new features for the serialization IO functionality. First, custom serializer version control should work now, just by defining a new REGISTER_CUSTOM_OBJECT_WRAPPER macro. For example: 2013-06-24 08:48:55 +00:00
osgFX Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
osgGA From Ulrich Hertlein, "attached is a patch that fixes another clang++ compiler warning when returning 2013-05-31 10:23:49 +00:00
osgManipulator Changed dispatch to virtual 2012-09-25 11:04:11 +00:00
osgParticle From Vladimir Chebaev, "I worked with osg::Particle and see that this class has setter osgParticle::setTextureTileRange and has no getters for startTile and endTile. This can be very uncomfortable. 2013-06-20 12:15:57 +00:00
osgPresentation Added <display_broadcast_event> and <dismiss_broadcast_event> support to <timeout> to allow the different timeout statges to be broadcast. 2013-01-17 13:51:52 +00:00
osgQt From Jan Ciger, compilation fix for Qt 5.0.2 2013-06-20 09:30:31 +00:00
osgShadow Fixed date typo 2013-05-28 14:40:36 +00:00
osgSim Fixed usage of META_NodeVisitor so it doesn't include "" 2013-01-24 18:48:34 +00:00
osgTerrain From Ulrich Hertlein, "Attached is a patch that introduces 'static_cast<unsigned int>' on some instances where 2013-05-14 16:12:21 +00:00
osgText Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
osgUtil From Pjotr Svetachov, introduced use of osg::observer_ptr<osg::Camera> in place of osg::Camera* 2013-06-21 13:59:18 +00:00
osgViewer Fixed panning bug, when using RUN_ON_DEMAND, that resulted in the camera being thrown off towards infinity. 2013-05-24 09:35:58 +00:00
osgVolume Added xml defined property/property animation to .p3d format for <volume> propeties: 2012-11-30 14:21:45 +00:00
osgWidget Changed point to osg::ref_ptr<> to prevent memory leaks. 2013-04-16 09:26:40 +00:00