Changeset View
Changeset View
Standalone View
Standalone View
source/renderer/backend/gl/Framebuffer.h
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | public: | ||||
IDevice* GetDevice() override; | IDevice* GetDevice() override; | ||||
const CColor& GetClearColor() const override { return m_ClearColor; } | const CColor& GetClearColor() const override { return m_ClearColor; } | ||||
GLuint GetHandle() const { return m_Handle; } | GLuint GetHandle() const { return m_Handle; } | ||||
GLbitfield GetAttachmentMask() const { return m_AttachmentMask; } | GLbitfield GetAttachmentMask() const { return m_AttachmentMask; } | ||||
AttachmentLoadOp GetColorAttachmentLoadOp() const { return m_ColorAttachmentLoadOp; } | |||||
AttachmentStoreOp GetColorAttachmentStoreOp() const { return m_ColorAttachmentStoreOp; } | |||||
AttachmentLoadOp GetDepthStencilAttachmentLoadOp() const { return m_DepthStencilAttachmentLoadOp; } | |||||
AttachmentStoreOp GetDepthStencilAttachmentStoreOp() const { return m_DepthStencilAttachmentStoreOp; } | |||||
uint32_t GetWidth() const { return m_Width; } | uint32_t GetWidth() const { return m_Width; } | ||||
uint32_t GetHeight() const { return m_Height; } | uint32_t GetHeight() const { return m_Height; } | ||||
private: | private: | ||||
friend class CDevice; | friend class CDevice; | ||||
static std::unique_ptr<CFramebuffer> Create( | static std::unique_ptr<CFramebuffer> Create( | ||||
CDevice* device, const char* name, | CDevice* device, const char* name, CTexture* colorAttachment, | ||||
CTexture* colorAttachment, CTexture* depthStencilAttachment, const CColor& clearColor); | const AttachmentLoadOp colorAttachmentLoadOp, | ||||
static std::unique_ptr<CFramebuffer> CreateBackbuffer(CDevice* device); | const AttachmentStoreOp colorAttachmentStoreOp, | ||||
const CColor& clearColor, CTexture* depthStencilAttachment, | |||||
const AttachmentLoadOp depthStencilAttachmentLoadOp, | |||||
const AttachmentStoreOp depthStencilAttachmentStoreOp); | |||||
static std::unique_ptr<CFramebuffer> CreateBackbuffer( | |||||
CDevice* device, | |||||
const AttachmentLoadOp colorAttachmentLoadOp, | |||||
const AttachmentStoreOp colorAttachmentStoreOp, | |||||
const AttachmentLoadOp depthStencilAttachmentLoadOp, | |||||
const AttachmentStoreOp depthStencilAttachmentStoreOp); | |||||
CFramebuffer(); | CFramebuffer(); | ||||
CDevice* m_Device = nullptr; | CDevice* m_Device = nullptr; | ||||
GLuint m_Handle = 0; | GLuint m_Handle = 0; | ||||
uint32_t m_Width = 0, m_Height = 0; | uint32_t m_Width = 0, m_Height = 0; | ||||
GLbitfield m_AttachmentMask = 0; | GLbitfield m_AttachmentMask = 0; | ||||
CColor m_ClearColor; | CColor m_ClearColor; | ||||
AttachmentLoadOp m_ColorAttachmentLoadOp = AttachmentLoadOp::DONT_CARE; | |||||
AttachmentStoreOp m_ColorAttachmentStoreOp = AttachmentStoreOp::DONT_CARE; | |||||
AttachmentLoadOp m_DepthStencilAttachmentLoadOp = AttachmentLoadOp::DONT_CARE; | |||||
AttachmentStoreOp m_DepthStencilAttachmentStoreOp = AttachmentStoreOp::DONT_CARE; | |||||
}; | }; | ||||
} // namespace GL | } // namespace GL | ||||
} // namespace Backend | } // namespace Backend | ||||
} // namespace Renderer | } // namespace Renderer | ||||
#endif // INCLUDED_RENDERER_BACKEND_GL_FRAMEBUFFER | #endif // INCLUDED_RENDERER_BACKEND_GL_FRAMEBUFFER |
Wildfire Games · Phabricator