diff --git a/include/osg/FrameBufferObject b/include/osg/FrameBufferObject index 8691a7a0d..fbbd27d61 100644 --- a/include/osg/FrameBufferObject +++ b/include/osg/FrameBufferObject @@ -350,6 +350,13 @@ namespace osg void attach(State &state, GLenum target, GLenum attachment_point, const FBOExtensions* ext) const; int compare(const FrameBufferAttachment &fa) const; + RenderBuffer* getRenderBuffer() const; + Texture* getTexture() const; + int getCubeMapFace() const; + int getTextureLevel() const; + int getTexture3DZOffset() const; + int getTextureArrayLayer() const; + private: // use the Pimpl idiom to avoid dependency from // all Texture* headers diff --git a/src/osg/FrameBufferObject.cpp b/src/osg/FrameBufferObject.cpp index c7766b843..b491f76fa 100644 --- a/src/osg/FrameBufferObject.cpp +++ b/src/osg/FrameBufferObject.cpp @@ -575,6 +575,36 @@ int FrameBufferAttachment::compare(const FrameBufferAttachment &fa) const return 0; } +RenderBuffer* FrameBufferAttachment::getRenderBuffer() const +{ + return _ximpl->renderbufferTarget.get(); +} + +Texture* FrameBufferAttachment::getTexture() const +{ + return _ximpl->textureTarget.get(); +} + +int FrameBufferAttachment::getCubeMapFace() const +{ + return _ximpl->cubeMapFace; +} + +int FrameBufferAttachment::getTextureLevel() const +{ + return _ximpl->level; +} + +int FrameBufferAttachment::getTexture3DZOffset() const +{ + return _ximpl->zoffset; +} + +int FrameBufferAttachment::getTextureArrayLayer() const +{ + return _ximpl->zoffset; +} + /************************************************************************** * FrameBufferObject **************************************************************************/