diff options
Diffstat (limited to 'src/Rendering/Framebuffer.h')
| -rw-r--r-- | src/Rendering/Framebuffer.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/Rendering/Framebuffer.h b/src/Rendering/Framebuffer.h index e4c1481..a01a81b 100644 --- a/src/Rendering/Framebuffer.h +++ b/src/Rendering/Framebuffer.h @@ -1,7 +1,7 @@ #pragma once -#include "Core/Memory.h" -#include "Texture.h" +#include "core/memory.h" +#include "texture.h" namespace Donut { @@ -21,24 +21,24 @@ namespace Donut { FramebufferTextureSpecification() = default; FramebufferTextureSpecification(FramebufferTextureFormat format) - : TextureFormat(format) {} + : texture_format(format) {} - FramebufferTextureFormat TextureFormat = FramebufferTextureFormat::None; + FramebufferTextureFormat texture_format = FramebufferTextureFormat::None; }; struct FramebufferAttachmentSpecification { FramebufferAttachmentSpecification() = default; FramebufferAttachmentSpecification(std::initializer_list<FramebufferTextureSpecification> attachments) - : Attachments(attachments) {} + : attachments(attachments) {} - std::vector<FramebufferTextureSpecification> Attachments; + std::vector<FramebufferTextureSpecification> attachments; }; struct FramebufferSpecification { uint32_t Width = 0, Height = 0; - FramebufferAttachmentSpecification Attachments; + FramebufferAttachmentSpecification attachments; uint32_t Samples = 1; bool SwapChainTarget = false; @@ -49,17 +49,17 @@ namespace Donut public: virtual ~Framebuffer() = default; - virtual void Bind() = 0; - virtual void Unbind() = 0; + virtual auto bind() -> void = 0; + virtual auto unbind() -> void = 0; - virtual void Resize(uint32_t width, uint32_t height) = 0; - virtual int ReadPixel(uint32_t attachmentIndex, int x, int y) = 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 void ClearAttachment(uint32_t attachmentIndex, int value) = 0; - virtual uint32_t GetColorAttachmentRendererID(uint32_t index = 0) const = 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 const FramebufferSpecification& GetSpecification() const = 0; + virtual auto get_specification() const -> const FramebufferSpecification& = 0; - static Ref<Framebuffer> Create(const FramebufferSpecification& spec); + static auto create(const FramebufferSpecification& spec) -> Ref<Framebuffer>; }; }; |
