From Michael Platings, "I've added functions to get the

texture, renderbuffer and other properties from a FrameBufferAttachment."
This commit is contained in:
Robert Osfield
2008-11-06 14:29:35 +00:00
parent 3f9e5dbfaa
commit b5aa966d12
2 changed files with 37 additions and 0 deletions

View File

@@ -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

View File

@@ -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
**************************************************************************/