light/modules/renderer/include/renderer/framebuffer.hpp
light7734 f2c692a118
All checks were successful
continuous-integration/drone/push Build is passing
style: apply clang-format v20
2025-07-11 14:05:59 +03:30

40 lines
665 B
C++

#pragma once
#include <glm/glm.hpp>
namespace lt {
class SharedContext;
struct FramebufferSpecification
{
unsigned int width {};
unsigned int height {};
unsigned int samples = 1;
};
class Framebuffer
{
public:
virtual ~Framebuffer() = default;
static auto create(
const FramebufferSpecification &specification,
const Ref<SharedContext> &sharedContext
) -> Ref<Framebuffer>;
virtual void bind_as_target(const glm::vec4 &clearColor) = 0;
virtual void bind_as_resource() = 0;
virtual void resize(const glm::uvec2 &size) = 0;
virtual auto get_color_attachment() -> void * = 0;
protected:
Framebuffer() = default;
};
} // namespace lt