From Wang Rui, "The new osgShadow and osgFX serializers are attached, and some
modifications of the osgShadow header naming styles as well. The osgDB::Serializer header is also changed to add new Vec2 serializer macros because of the needs of osgShadow classes. It should compile fine on both Windows and Linux. But I have only done a few tests to generate .osgb, .osgt and .osgx formats with these new wrappers."
This commit is contained in:
@@ -747,7 +747,7 @@ public:
|
||||
|
||||
// ADDING MANIPULATORS
|
||||
#define ADD_SERIALIZER(S) \
|
||||
wrapper->addSerializer(S)
|
||||
wrapper->addSerializer( (S) )
|
||||
|
||||
#define ADD_USER_SERIALIZER(PROP) \
|
||||
wrapper->addSerializer( new osgDB::UserSerializer<MyClass>( \
|
||||
@@ -793,6 +793,16 @@ public:
|
||||
wrapper->addSerializer( new osgDB::PropByValSerializer< MyClass, double >( \
|
||||
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP) )
|
||||
|
||||
#define ADD_VEC2F_SERIALIZER(PROP, DEF) \
|
||||
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec2f >( \
|
||||
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP) )
|
||||
|
||||
#define ADD_VEC2D_SERIALIZER(PROP, DEF) \
|
||||
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec2d >( \
|
||||
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP) )
|
||||
|
||||
#define ADD_VEC2_SERIALIZER(PROP, DEF) ADD_VEC2F_SERIALIZER(PROP, DEF)
|
||||
|
||||
#define ADD_VEC3F_SERIALIZER(PROP, DEF) \
|
||||
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec3f >( \
|
||||
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP) )
|
||||
|
||||
Reference in New Issue
Block a user