diff options
| author | hachem <im@hachem.wtf> | 2026-08-20 03:00:56 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-08-20 08:13:17 +0200 |
| commit | 9a19ae463880e06bae84eb8ae1b7279595ecdc38 (patch) | |
| tree | a652344ef39837096dc76b0386550870eec3f77e /src/Rendering/Framebuffer.h | |
| parent | b0be47e54943bf45babac5bce6c2f6f0dc5cb4dc (diff) | |
[fix]: path for the logo
Diffstat (limited to 'src/Rendering/Framebuffer.h')
| -rw-r--r-- | src/Rendering/Framebuffer.h | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/src/Rendering/Framebuffer.h b/src/Rendering/Framebuffer.h deleted file mode 100644 index a01a81b..0000000 --- a/src/Rendering/Framebuffer.h +++ /dev/null @@ -1,65 +0,0 @@ -#pragma once - -#include "core/memory.h" -#include "texture.h" - -namespace Donut -{ - enum class FramebufferTextureFormat - { - None = 0, - - RGBA8, - RED_INTEGER, - - DEPTH24STENCIL8, - - Depth = DEPTH24STENCIL8 - }; - - struct FramebufferTextureSpecification - { - FramebufferTextureSpecification() = default; - FramebufferTextureSpecification(FramebufferTextureFormat format) - : texture_format(format) {} - - FramebufferTextureFormat texture_format = FramebufferTextureFormat::None; - }; - - struct FramebufferAttachmentSpecification - { - FramebufferAttachmentSpecification() = default; - FramebufferAttachmentSpecification(std::initializer_list<FramebufferTextureSpecification> attachments) - : attachments(attachments) {} - - std::vector<FramebufferTextureSpecification> attachments; - }; - - struct FramebufferSpecification - { - uint32_t Width = 0, Height = 0; - FramebufferAttachmentSpecification attachments; - uint32_t Samples = 1; - - bool SwapChainTarget = false; - }; - - class Framebuffer - { - public: - virtual ~Framebuffer() = default; - - virtual auto bind() -> void = 0; - virtual auto unbind() -> void = 0; - - virtual auto resize(uint32_t width, uint32_t height) -> void = 0; - virtual auto read_pixel(uint32_t attachment_index, int x, int y) -> int = 0; - - virtual auto clear_attachment(uint32_t attachment_index, int value) -> void = 0; - virtual auto get_color_attachment_renderer_id(uint32_t index = 0) const -> uint32_t = 0; - - virtual auto get_specification() const -> const FramebufferSpecification& = 0; - - static auto create(const FramebufferSpecification& spec) -> Ref<Framebuffer>; - }; -}; |
