Grindstone Game Engine v0.2.0
An open source game engine and toolkit.
Loading...
Searching...
No Matches
GLFramebuffer.hpp
1#pragma once
2
3#include <Common/Graphics/Framebuffer.hpp>
4#include <Common/Graphics/DLLDefs.hpp>
5
6namespace Grindstone::GraphicsAPI::OpenGL {
8 public:
9 Framebuffer(const CreateInfo& createInfo);
11
12 virtual void Blit(uint32_t i, uint32_t x, uint32_t y, uint32_t w, uint32_t h);
13
14 // Inherited via Framebuffer
15 virtual RenderPass* GetRenderPass() const override;
16 virtual uint32_t GetAttachment(uint32_t attachmentIndex) override;
17 virtual void Clear(ClearMode mask) override;
18 virtual void Resize(uint32_t newWidth, uint32_t newHeight) override;
19 virtual void Bind() override;
20 virtual void BindWrite() override;
21 virtual void BindRead() override;
22 virtual void BindTextures(int i) override;
23 virtual void Unbind() override;
24 virtual uint32_t GetWidth() const override;
25 virtual uint32_t GetHeight() const override;
26 virtual uint32_t GetRenderTargetCount() const override;
27 virtual Grindstone::GraphicsAPI::RenderTarget* GetRenderTarget(uint32_t index) const override;
28 virtual Grindstone::GraphicsAPI::DepthStencilTarget* GetDepthStencilTarget() const override;
29 private:
30 void CreateFramebuffer();
31 private:
32 std::string debugName;
33 GLuint framebuffer = 0;
34 GLsizei numTotalRenderTargets = 0;
35 Grindstone::GraphicsAPI::RenderPass* renderPass = nullptr;
36 std::vector<Grindstone::GraphicsAPI::RenderTarget*> colorAttachments;
38 uint32_t width;
39 uint32_t height;
40 };
41}
Definition DepthStencilTarget.hpp:15
Definition Framebuffer.hpp:19
Definition GLFramebuffer.hpp:7
Definition RenderPass.hpp:27
Definition RenderTarget.hpp:12