Added serializer for Texture2DMultisample

This commit is contained in:
Marcel Pursche 2017-03-22 10:42:13 +01:00
parent 44e303ad90
commit 422587a285
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; }
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*/) {}

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
}