From 0555bc4bc78a5aaaef044a328d720fbed866b8f2 Mon Sep 17 00:00:00 2001 From: mp3butcher Date: Tue, 28 Mar 2017 20:48:35 +0200 Subject: [PATCH 1/3] add BufferData associate as well as revisionassociate in PrimitiveSet Seriliazer --- .../serializers/osg/PrimitiveSet.cpp | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/src/osgWrappers/serializers/osg/PrimitiveSet.cpp b/src/osgWrappers/serializers/osg/PrimitiveSet.cpp index ad715dd20..eeb5186cb 100644 --- a/src/osgWrappers/serializers/osg/PrimitiveSet.cpp +++ b/src/osgWrappers/serializers/osg/PrimitiveSet.cpp @@ -16,9 +16,12 @@ osg::ref_ptr serializer = new MySerializer( \ REGISTER_OBJECT_WRAPPER( PrimitiveSet, 0, osg::PrimitiveSet, - "osg::Object osg::PrimitiveSet" ) + "osg::Object osg::BufferData osg::PrimitiveSet" ) { - + { + UPDATE_TO_VERSION_SCOPED( 147 ) + ADDED_ASSOCIATE("osg::BufferData") + } ADD_INT_SERIALIZER( NumInstances, 0); #if 1 @@ -80,8 +83,12 @@ namespace DrawArraysWrapper { REGISTER_OBJECT_WRAPPER( DrawArrays, new osg::DrawArrays, osg::DrawArrays, - "osg::Object osg::PrimitiveSet osg::DrawArrays" ) + "osg::Object osg::BufferData osg::PrimitiveSet osg::DrawArrays" ) { + { + UPDATE_TO_VERSION_SCOPED( 147 ) + ADDED_ASSOCIATE("osg::BufferData") + } ADD_GLINT_SERIALIZER( First, 0); ADD_GLINT_SERIALIZER( Count, 0); } @@ -93,8 +100,12 @@ namespace DrawArrayLengthsWrapper { REGISTER_OBJECT_WRAPPER( DrawArrayLengths, new osg::DrawArrayLengths, osg::DrawArrayLengths, - "osg::Object osg::PrimitiveSet osg::DrawArrayLengths" ) + "osg::Object osg::BufferData osg::PrimitiveSet osg::DrawArrayLengths" ) { + { + UPDATE_TO_VERSION_SCOPED( 147 ) + ADDED_ASSOCIATE("osg::BufferData") + } ADD_GLINT_SERIALIZER( First, 0); ADD_ISAVECTOR_SERIALIZER( vector, osgDB::BaseSerializer::RW_INT, 4 ); } @@ -130,7 +141,7 @@ struct ResizeDrawElements : public osgDB::MethodObject REGISTER_OBJECT_WRAPPER( DrawElements, 0, osg::DrawElements, - "osg::Object osg::PrimitiveSet osg::DrawElements" ) + "osg::Object osg::BufferData osg::PrimitiveSet osg::DrawElements" ) { ADD_METHOD_OBJECT( "resizeElements", ResizeDrawElements ); } @@ -140,7 +151,7 @@ REGISTER_OBJECT_WRAPPER( DrawElements, #define DRAW_ELEMENTS_WRAPPER( DRAWELEMENTS, ELEMENTTYPE ) \ namespace Wrapper##DRAWELEMENTS { \ - REGISTER_OBJECT_WRAPPER( DRAWELEMENTS, new osg::DRAWELEMENTS, osg::DRAWELEMENTS, "osg::Object osg::PrimitiveSet osg::"#DRAWELEMENTS) \ + REGISTER_OBJECT_WRAPPER( DRAWELEMENTS, new osg::DRAWELEMENTS, osg::DRAWELEMENTS, "osg::Object osg::BufferData osg::PrimitiveSet osg::"#DRAWELEMENTS) \ { \ ADD_ISAVECTOR_SERIALIZER( vector, osgDB::BaseSerializer::ELEMENTTYPE, 4 ); \ } \ @@ -156,7 +167,7 @@ namespace MultiDrawArrayWrapper { REGISTER_OBJECT_WRAPPER( MultiDrawArrays, new osg::MultiDrawArrays, osg::MultiDrawArrays, - "osg::Object osg::PrimitiveSet osg::MultiDrawArrays" ) + "osg::Object osg::BufferData osg::PrimitiveSet osg::MultiDrawArrays" ) { ADD_VECTOR_SERIALIZER( Firsts, osg::MultiDrawArrays::Firsts, osgDB::BaseSerializer::RW_INT, 8 ); ADD_VECTOR_SERIALIZER( Counts, osg::MultiDrawArrays::Counts, osgDB::BaseSerializer::RW_INT, 8 ); From fc3afbe449348e2c6a9f8de9595e4d59c3387557 Mon Sep 17 00:00:00 2001 From: mp3butcher Date: Tue, 28 Mar 2017 22:14:44 +0200 Subject: [PATCH 2/3] oups forgot an associaterevisions --- src/osgWrappers/serializers/osg/PrimitiveSet.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/osgWrappers/serializers/osg/PrimitiveSet.cpp b/src/osgWrappers/serializers/osg/PrimitiveSet.cpp index eeb5186cb..3d5fe1184 100644 --- a/src/osgWrappers/serializers/osg/PrimitiveSet.cpp +++ b/src/osgWrappers/serializers/osg/PrimitiveSet.cpp @@ -152,7 +152,11 @@ REGISTER_OBJECT_WRAPPER( DrawElements, #define DRAW_ELEMENTS_WRAPPER( DRAWELEMENTS, ELEMENTTYPE ) \ namespace Wrapper##DRAWELEMENTS { \ REGISTER_OBJECT_WRAPPER( DRAWELEMENTS, new osg::DRAWELEMENTS, osg::DRAWELEMENTS, "osg::Object osg::BufferData osg::PrimitiveSet osg::"#DRAWELEMENTS) \ - { \ + { \ + { \ + UPDATE_TO_VERSION_SCOPED( 147 ) \ + ADDED_ASSOCIATE("osg::BufferData") \ + }\ ADD_ISAVECTOR_SERIALIZER( vector, osgDB::BaseSerializer::ELEMENTTYPE, 4 ); \ } \ } From 3142b682f2218776186a1cb1ad274216ca83888d Mon Sep 17 00:00:00 2001 From: mp3butcher Date: Tue, 28 Mar 2017 22:19:32 +0200 Subject: [PATCH 3/3] remove spaces in the previsouly added macro --- src/osgWrappers/serializers/osg/PrimitiveSet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgWrappers/serializers/osg/PrimitiveSet.cpp b/src/osgWrappers/serializers/osg/PrimitiveSet.cpp index 3d5fe1184..3de41c3bc 100644 --- a/src/osgWrappers/serializers/osg/PrimitiveSet.cpp +++ b/src/osgWrappers/serializers/osg/PrimitiveSet.cpp @@ -152,7 +152,7 @@ REGISTER_OBJECT_WRAPPER( DrawElements, #define DRAW_ELEMENTS_WRAPPER( DRAWELEMENTS, ELEMENTTYPE ) \ namespace Wrapper##DRAWELEMENTS { \ REGISTER_OBJECT_WRAPPER( DRAWELEMENTS, new osg::DRAWELEMENTS, osg::DRAWELEMENTS, "osg::Object osg::BufferData osg::PrimitiveSet osg::"#DRAWELEMENTS) \ - { \ + { \ { \ UPDATE_TO_VERSION_SCOPED( 147 ) \ ADDED_ASSOCIATE("osg::BufferData") \