Content


NTL
Core
IFramebuffer

IFramebuffer



Describes framebuffer object.

You can find more information in comments below.

class IFramebuffer :public virtual IReleasable
{
protected:
    PlatformHandle m_hHandle;
    IBaseTexture *m_pDepthAttachment;
    int m_iDepthAttachmentLevel;
    IBaseTexture *m_pStencilAttachment;
    int m_iStencilAttachmentLevel;
public:
    PlatformHandle const &Handle; // Platform-dependent handle 
    IBaseTexture* const &DepthAttachment; // Texture attached as depth attachment 
    int &DepthAttachmentLevel; // Used depth attachment texture level 
    IBaseTexture* 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 IBaseTexture *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(IBaseTexture *value, const int level = 0, const bool force = false) = 0; // Attach texture as depth attachment. Use nullptr to clear attachment 
    virtual bool setStencilAttachment(IBaseTexture *value, const int level = 0, const bool force = false) = 0; // Attach texture as stencil attachment. Use nullptr to clear attachment 
    virtual bool setDepthStencilAttachment(IBaseTexture *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(IBaseTexture *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