diff --git a/src/osgWrappers/osg/Image.cpp b/src/osgWrappers/osg/Image.cpp index 247482948..2537c0e85 100644 --- a/src/osgWrappers/osg/Image.cpp +++ b/src/osgWrappers/osg/Image.cpp @@ -58,7 +58,9 @@ BEGIN_OBJECT_REFLECTOR(osg::Image) I_Method0(GLint, getInternalTextureFormat); I_Method1(void, setPixelFormat, IN, GLenum, pixelFormat); I_Method0(GLenum, getPixelFormat); + I_Method1(void, setDataType, IN, GLenum, dataType); I_Method0(GLenum, getDataType); + I_Method1(void, setPacking, IN, unsigned int, packing); I_Method0(unsigned int, getPacking); I_Method0(unsigned int, getPixelSizeInBits); I_Method0(unsigned int, getRowSizeInBytes); @@ -88,13 +90,13 @@ BEGIN_OBJECT_REFLECTOR(osg::Image) I_Method0(osg::PixelBufferObject *, getPixelBufferObject); I_Method0(const osg::PixelBufferObject *, getPixelBufferObject); I_Property(osg::Image::AllocationMode, AllocationMode); - I_ReadOnlyProperty(GLenum, DataType); + I_Property(GLenum, DataType); I_Property(const std::string &, FileName); I_ReadOnlyProperty(unsigned int, ImageSizeInBytes); I_Property(GLint, InternalTextureFormat); I_Property(const osg::Image::MipmapDataType &, MipmapLevels); I_Property(unsigned int, ModifiedCount); - I_ReadOnlyProperty(unsigned int, Packing); + I_Property(unsigned int, Packing); I_Property(osg::PixelBufferObject *, PixelBufferObject); I_Property(GLenum, PixelFormat); I_ReadOnlyProperty(unsigned int, PixelSizeInBits); diff --git a/src/osgWrappers/osg/Texture.cpp b/src/osgWrappers/osg/Texture.cpp index 4d7445472..6a9a283ac 100644 --- a/src/osgWrappers/osg/Texture.cpp +++ b/src/osgWrappers/osg/Texture.cpp @@ -139,6 +139,7 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::Texture) I_Method0(unsigned int, getNumImages); I_Method1(void, setReadPBuffer, IN, osg::GraphicsContext *, context); I_Method0(osg::GraphicsContext *, getReadPBuffer); + I_Method0(const osg::GraphicsContext *, getReadPBuffer); I_Method1(void, apply, IN, osg::State &, state); I_Method1(void, compileGLObjects, IN, osg::State &, state); I_MethodWithDefaults1(void, releaseGLObjects, IN, osg::State *, state, 0); diff --git a/src/osgWrappers/osgUtil/Optimizer.cpp b/src/osgWrappers/osgUtil/Optimizer.cpp index 0b86f5be3..1c181bdf8 100644 --- a/src/osgWrappers/osgUtil/Optimizer.cpp +++ b/src/osgWrappers/osgUtil/Optimizer.cpp @@ -13,7 +13,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -21,6 +23,7 @@ #include #include #include +#include #include #include @@ -220,6 +223,34 @@ BEGIN_OBJECT_REFLECTOR(osgUtil::Optimizer::TesselateVisitor) I_Method1(void, apply, IN, osg::Geode &, geode); END_REFLECTOR +BEGIN_VALUE_REFLECTOR(osgUtil::Optimizer::TextureAtlasBuilder) + I_Constructor0(); + I_Method2(void, setMaximumAtlasSize, IN, unsigned int, width, IN, unsigned int, height); + I_Method0(unsigned int, getMaximumAtlasWidth); + I_Method0(unsigned int, getMaximumAtlasHeight); + I_Method1(void, setMargin, IN, unsigned int, margin); + I_Method0(unsigned int, getMargin); + I_Method1(void, addSource, IN, const osg::Image *, image); + I_Method1(void, addSource, IN, const osg::Texture2D *, texture); + I_Method0(unsigned int, getNumSources); + I_Method1(const osg::Image *, getSourceImage, IN, unsigned int, i); + I_Method1(const osg::Texture2D *, getSourceTexture, IN, unsigned int, i); + I_Method0(void, buildAtlas); + I_Method1(osg::Image *, getImageAtlas, IN, unsigned int, i); + I_Method1(osg::Texture2D *, getTextureAtlas, IN, unsigned int, i); + I_Method1(osg::Matrix, getTextureMatrix, IN, unsigned int, i); + I_Method1(osg::Image *, getImageAtlas, IN, const osg::Image *, image); + I_Method1(osg::Texture2D *, getTextureAtlas, IN, const osg::Image *, image); + I_Method1(osg::Matrix, getTextureMatrix, IN, const osg::Image *, image); + I_Method1(osg::Image *, getImageAtlas, IN, const osg::Texture2D *, image); + I_Method1(osg::Texture2D *, getTextureAtlas, IN, const osg::Texture2D *, texture); + I_Method1(osg::Matrix, getTextureMatrix, IN, const osg::Texture2D *, texture); + I_Property(unsigned int, Margin); + I_ReadOnlyProperty(unsigned int, MaximumAtlasHeight); + I_ReadOnlyProperty(unsigned int, MaximumAtlasWidth); + I_ArrayProperty_Custom(const osg::Texture2D *, Source, Sources, unsigned int, void); +END_REFLECTOR + BEGIN_OBJECT_REFLECTOR(osgUtil::Optimizer::TextureVisitor) I_BaseType(osgUtil::BaseOptimizerVisitor); I_ConstructorWithDefaults7(IN, bool, changeAutoUnRef, , IN, bool, valueAutoUnRef, , IN, bool, changeClientImageStorage, , IN, bool, valueClientImageStorage, , IN, bool, changeAnisotropy, , IN, float, valueAnisotropy, , IN, osgUtil::Optimizer *, optimizer, 0);