Describes framebuffer object.
You can find more information in comments below.
class IFramebuffer :public virtual IReleasable
{
protected:
PlatformHandle m_hHandle;
ITexture *m_pDepthAttachment;
int m_iDepthAttachmentLevel;
ITexture *m_pStencilAttachment;
int m_iStencilAttachmentLevel;
public:
PlatformHandle const &Handle; // Platform-dependent handle
ITexture* const &DepthAttachment; // Texture attached as depth attachment
int &DepthAttachmentLevel; // Used depth attachment texture level
ITexture* const &StencilAttachment; // Texture attached as stencil attachment
int &StencilAttachmentLevel; // Used stencil attachment texture level
virtual int getColorAttachmentCount() const = 0; // Return count of set color attachments
virtual ITexture *getColorAttachment(const int index) = 0; // Return texture attached as color attachment by index
virtual int getColorAttachmentLevel(const int index) const = 0; // Return used color attachment texture level by index
virtual bool setDepthAttachment(ITexture *value, const int level = 0, const bool force = false) = 0; // Attach texture as depth attachment. Use nullptr to clear attachment
virtual bool setStencilAttachment(ITexture *value, const int level = 0, const bool force = false) = 0; // Attach texture as stencil attachment. Use nullptr to clear attachment
virtual bool setDepthStencilAttachment(ITexture *value, const int level = 0, const bool force = false) = 0; // Attach texture as both depth and stencil attachment. Use nullptr to clear attachment
virtual bool setColorAttachment(ITexture *value, const int index, const int level = 0, const bool force = false) = 0; // Attach texture as color attachment. Use nullptr to clear attachment
};
Namespace: | nitisa |
Include: | Nitisa/Interfaces/IFramebuffer.h |