From 422587a2851a0d6248c32fe78ce9098949a1062e Mon Sep 17 00:00:00 2001 From: Marcel Pursche Date: Wed, 22 Mar 2017 10:42:13 +0100 Subject: [PATCH] Added serializer for Texture2DMultisample --- include/osg/Texture2DMultisample | 3 +++ .../serializers/osg/Texture2DMultisample.cpp | 15 +++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 src/osgWrappers/serializers/osg/Texture2DMultisample.cpp diff --git a/include/osg/Texture2DMultisample b/include/osg/Texture2DMultisample index 13c55ed52..75ba1dc15 100644 --- a/include/osg/Texture2DMultisample +++ b/include/osg/Texture2DMultisample @@ -61,6 +61,9 @@ class OSG_EXPORT Texture2DMultisample : public Texture inline void setNumSamples( int samples ) { _numSamples = samples; } GLsizei getNumSamples() const { return _numSamples; } + inline void setFixedSampleLocations( GLboolean fixedSampleLocations ) { _fixedsamplelocations = fixedSampleLocations; } + inline GLboolean getFixedSampleLocations() const { return _fixedsamplelocations; } + // unnecessary for Texture2DMultisample virtual void setImage(unsigned int /*face*/, Image* /*image*/) {} diff --git a/src/osgWrappers/serializers/osg/Texture2DMultisample.cpp b/src/osgWrappers/serializers/osg/Texture2DMultisample.cpp new file mode 100644 index 000000000..7c969ab31 --- /dev/null +++ b/src/osgWrappers/serializers/osg/Texture2DMultisample.cpp @@ -0,0 +1,15 @@ +#include +#include +#include +#include + +REGISTER_OBJECT_WRAPPER( Texture2DMultisample, + new osg::Texture2DMultisample, + osg::Texture2DMultisample, + "osg::Object osg::StateAttribute osg::Texture osg::Texture2DMultisample" ) +{ + ADD_INT_SERIALIZER( TextureWidth, 0 ); // _textureWidth + ADD_INT_SERIALIZER( TextureHeight, 0 ); // _textureHeight + ADD_INT_SERIALIZER( NumSamples, 1 ); // _numSamples + ADD_UCHAR_SERIALIZER( FixedSampleLocations, GL_FALSE ); // _fixedsamplelocations +}