Added serializers for BufferObject and BufferData
This commit is contained in:
@@ -34,8 +34,14 @@ struct ResizeArray : public osgDB::MethodObject
|
||||
REGISTER_OBJECT_WRAPPER( Array,
|
||||
0,
|
||||
osg::Array,
|
||||
"osg::Object osg::Array" )
|
||||
"osg::Object osg::BufferData osg::Array" )
|
||||
{
|
||||
|
||||
|
||||
{
|
||||
UPDATE_TO_VERSION_SCOPED( 147 )
|
||||
ADDED_ASSOCIATE("osg::BufferData")
|
||||
}
|
||||
#if 0
|
||||
BEGIN_ENUM_SERIALIZER_NO_SET( Type, ArrayType );
|
||||
ADD_ENUM_VALUE( ArrayType );
|
||||
@@ -114,8 +120,12 @@ REGISTER_OBJECT_WRAPPER( Array,
|
||||
|
||||
#define ARRAY_WRAPPERS( ARRAY, ELEMENTTYPE, NUMELEMENTSONROW ) \
|
||||
namespace Wrappers##ARRAY { \
|
||||
REGISTER_OBJECT_WRAPPER( ARRAY, new osg::ARRAY, osg::ARRAY, "osg::Object osg::Array osg::"#ARRAY) \
|
||||
REGISTER_OBJECT_WRAPPER( ARRAY, new osg::ARRAY, osg::ARRAY, "osg::Object osg::BufferData osg::Array osg::"#ARRAY) \
|
||||
{ \
|
||||
{\
|
||||
UPDATE_TO_VERSION_SCOPED( 147 )\
|
||||
ADDED_ASSOCIATE("osg::BufferData")\
|
||||
}\
|
||||
ADD_ISAVECTOR_SERIALIZER( vector, osgDB::BaseSerializer::ELEMENTTYPE, NUMELEMENTSONROW ); \
|
||||
} \
|
||||
}
|
||||
|
||||
17
src/osgWrappers/serializers/osg/BufferData.cpp
Normal file
17
src/osgWrappers/serializers/osg/BufferData.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#include <osg/BufferObject>
|
||||
#include <osgDB/ObjectWrapper>
|
||||
#include <osgDB/InputStream>
|
||||
#include <osgDB/OutputStream>
|
||||
|
||||
|
||||
|
||||
REGISTER_OBJECT_WRAPPER( BufferData,
|
||||
0,
|
||||
osg::BufferData,
|
||||
"osg::Object osg::BufferData" )
|
||||
{
|
||||
{
|
||||
UPDATE_TO_VERSION_SCOPED( 147 )
|
||||
ADD_OBJECT_SERIALIZER(BufferObject, osg::BufferObject, NULL);
|
||||
}
|
||||
}
|
||||
14
src/osgWrappers/serializers/osg/BufferObject.cpp
Normal file
14
src/osgWrappers/serializers/osg/BufferObject.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <osg/BufferObject>
|
||||
#include <osgDB/ObjectWrapper>
|
||||
#include <osgDB/InputStream>
|
||||
#include <osgDB/OutputStream>
|
||||
|
||||
REGISTER_OBJECT_WRAPPER( BufferObject,
|
||||
/*new osg::BufferObject*/NULL,
|
||||
osg::BufferObject,
|
||||
"osg::Object osg::BufferObject" )
|
||||
{
|
||||
ADD_GLENUM_SERIALIZER( Target,GLenum, GL_ARRAY_BUFFER_ARB); // _type
|
||||
ADD_GLENUM_SERIALIZER( Usage,GLenum, GL_STATIC_DRAW_ARB); // _type setTarget(GL_ARRAY_BUFFER_ARB);
|
||||
ADD_BOOL_SERIALIZER( CopyDataAndReleaseGLBufferObject, false);
|
||||
}
|
||||
12
src/osgWrappers/serializers/osg/ElementBufferObject.cpp
Normal file
12
src/osgWrappers/serializers/osg/ElementBufferObject.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#include <osg/BufferObject>
|
||||
#include <osgDB/ObjectWrapper>
|
||||
#include <osgDB/InputStream>
|
||||
#include <osgDB/OutputStream>
|
||||
|
||||
|
||||
REGISTER_OBJECT_WRAPPER( ElementBufferObject,
|
||||
new osg::ElementBufferObject,
|
||||
osg::ElementBufferObject,
|
||||
"osg::Object osg::BufferObject osg::ElementBufferObject" )
|
||||
{
|
||||
}
|
||||
11
src/osgWrappers/serializers/osg/VertexBufferObject.cpp
Normal file
11
src/osgWrappers/serializers/osg/VertexBufferObject.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include <osg/BufferObject>
|
||||
#include <osgDB/ObjectWrapper>
|
||||
#include <osgDB/InputStream>
|
||||
#include <osgDB/OutputStream>
|
||||
|
||||
REGISTER_OBJECT_WRAPPER( VertexBufferObject,
|
||||
new osg::VertexBufferObject,
|
||||
osg::VertexBufferObject,
|
||||
"osg::Object osg::BufferObject osg::VertexBufferObject" )
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user