Merge pull request #225 from MPursche/add_texture2dmultisample_serializer

Added serializer for Texture2DMultisample
This commit is contained in:
OpenSceneGraph git repository 2017-03-22 10:31:45 +00:00 committed by GitHub
commit 602a6beda8
2 changed files with 18 additions and 0 deletions

View File

@ -61,6 +61,9 @@ class OSG_EXPORT Texture2DMultisample : public Texture
inline void setNumSamples( int samples ) { _numSamples = samples; } inline void setNumSamples( int samples ) { _numSamples = samples; }
GLsizei getNumSamples() const { return _numSamples; } GLsizei getNumSamples() const { return _numSamples; }
inline void setFixedSampleLocations( GLboolean fixedSampleLocations ) { _fixedsamplelocations = fixedSampleLocations; }
inline GLboolean getFixedSampleLocations() const { return _fixedsamplelocations; }
// unnecessary for Texture2DMultisample // unnecessary for Texture2DMultisample
virtual void setImage(unsigned int /*face*/, Image* /*image*/) {} virtual void setImage(unsigned int /*face*/, Image* /*image*/) {}

View File

@ -0,0 +1,15 @@
#include <osg/Texture2DMultisample>
#include <osgDB/ObjectWrapper>
#include <osgDB/InputStream>
#include <osgDB/OutputStream>
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
}