add (untested) BindImageTexture serializer
TOREVIEW : my GLBoolean serializer macro seams hacky
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
/// author: Julien Valentin 2017 (mp3butcher@hotmail.com)
|
||||
/// author: Julien Valentin 2017 (mp3butcher@hotmail.com)
|
||||
|
||||
#ifndef _GLImageUnitBinding_H
|
||||
#define _GLImageUnitBinding_H
|
||||
@@ -29,7 +29,7 @@ namespace osg
|
||||
class OSG_EXPORT BindImageTexture : public osg::StateAttribute {
|
||||
public:
|
||||
/** Type of access that will be performed on the texture image. */
|
||||
enum ImageAccess
|
||||
enum Access
|
||||
{
|
||||
NOT_USED = 0,
|
||||
READ_ONLY = GL_READ_ONLY_ARB,
|
||||
@@ -40,7 +40,7 @@ class OSG_EXPORT BindImageTexture : public osg::StateAttribute {
|
||||
BindImageTexture(
|
||||
GLuint imageunit = 0,
|
||||
osg::Texture* target = 0,
|
||||
ImageAccess access = READ_ONLY,
|
||||
Access access = READ_ONLY,
|
||||
GLenum format = GL_RGBA8,
|
||||
int level = 0,
|
||||
bool layered = GL_FALSE,
|
||||
@@ -67,27 +67,27 @@ class OSG_EXPORT BindImageTexture : public osg::StateAttribute {
|
||||
|
||||
META_StateAttribute(osg,BindImageTexture, BINDIMAGETEXTURE)
|
||||
|
||||
void setImageUnit(GLuint i) { _imageunit=i; }
|
||||
GLuint getImageUnit() const { return _imageunit; }
|
||||
inline void setImageUnit(GLuint i) { _imageunit=i; }
|
||||
inline GLuint getImageUnit() const { return _imageunit; }
|
||||
|
||||
void setLevel(GLint i) { _level=i; }
|
||||
GLint getLevel() const { return _level; }
|
||||
inline void setLevel(GLint i) { _level=i; }
|
||||
inline GLint getLevel() const { return _level; }
|
||||
|
||||
void setIsLayered(GLboolean i) { _layered=i; }
|
||||
GLboolean getIsLayered() const { return _layered; }
|
||||
inline void setIsLayered(GLboolean i) { _layered=i; }
|
||||
inline GLboolean getIsLayered() const { return _layered; }
|
||||
|
||||
void setLayer(GLint i) { _layer=i; }
|
||||
GLint getLayer() const { return _layer; }
|
||||
inline void setLayer(GLint i) { _layer=i; }
|
||||
inline GLint getLayer() const { return _layer; }
|
||||
|
||||
void setAccess(ImageAccess i) { _access=i; }
|
||||
GLenum getAccess()const { return _access; }
|
||||
inline void setAccess(Access i) { _access=i; }
|
||||
inline Access getAccess() const { return _access; }
|
||||
|
||||
void setFormat(GLenum i) { _format=i; }
|
||||
GLenum getFormat()const { return _format; }
|
||||
inline void setFormat(GLenum i) { _format=i; }
|
||||
inline GLenum getFormat() const { return _format; }
|
||||
|
||||
void setTexture(osg::Texture* target) { _target=target; }
|
||||
osg::Texture* getTexture() { return _target.get();}
|
||||
const osg::Texture* getTexture() const { return _target.get();}
|
||||
inline void setTexture(osg::Texture* target) { _target=target; }
|
||||
inline osg::Texture* getTexture() { return _target.get();}
|
||||
inline const osg::Texture* getTexture() const { return _target.get();}
|
||||
|
||||
virtual void apply(osg::State&state) const;
|
||||
|
||||
@@ -102,11 +102,10 @@ class OSG_EXPORT BindImageTexture : public osg::StateAttribute {
|
||||
GLint _level;
|
||||
GLboolean _layered;
|
||||
GLint _layer;
|
||||
GLenum _access;
|
||||
Access _access;
|
||||
GLenum _format;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user