Grindstone Game Engine v0.2.0
An open source game engine and toolkit.
Loading...
Searching...
No Matches
Framebuffer.hpp
1#pragma once
2
3#include "RenderPass.hpp"
4#include "Formats.hpp"
5#include "RenderTarget.hpp"
6#include "DepthStencilTarget.hpp"
7#include <vector>
8#include <stdint.h>
9
10namespace Grindstone::GraphicsAPI {
11 class RenderPass;
12 class RenderTarget;
13 class DepthStencilTarget;
14
20 public:
22 uint32_t width;
23 uint32_t height;
24 RenderPass* renderPass = nullptr;
25 };
26
27 struct CreateInfo {
28 const char* debugName;
29 RenderPass* renderPass;
30 uint32_t width;
31 uint32_t height;
32
33 RenderTarget** renderTargetLists;
34 uint32_t numRenderTargetLists;
35 DepthStencilTarget* depthTarget;
36 bool isCubemap = false;
37 };
38
39 virtual uint32_t GetAttachment(uint32_t attachmentIndex) = 0;
40 virtual RenderPass* GetRenderPass() const = 0;
41 virtual void Resize(uint32_t width, uint32_t height) = 0;
42 virtual void Clear(ClearMode mask) = 0;
43 virtual void BindTextures(int i) = 0;
44 virtual void Bind() = 0;
45 virtual void BindWrite() = 0;
46 virtual void BindRead() = 0;
47 virtual void Unbind() = 0;
48 virtual uint32_t GetWidth() const = 0;
49 virtual uint32_t GetHeight() const = 0;
50 virtual uint32_t GetRenderTargetCount() const = 0;
51 virtual RenderTarget* GetRenderTarget(uint32_t index) const = 0;
52 virtual DepthStencilTarget* GetDepthStencilTarget() const = 0;
53 virtual ~Framebuffer() {};
54 };
55}
Definition DepthStencilTarget.hpp:15
Definition Framebuffer.hpp:19
Definition RenderPass.hpp:27
Definition RenderTarget.hpp:12