2025-07-05 13:28:41 +03:30
|
|
|
#pragma once
|
|
|
|
|
2025-07-17 10:44:00 +03:30
|
|
|
#include <math/vec2.hpp>
|
|
|
|
#include <math/vec4.hpp>
|
2025-07-10 13:29:03 +03:30
|
|
|
#include <renderer/framebuffer.hpp>
|
2025-07-05 13:28:41 +03:30
|
|
|
|
2025-07-11 00:05:48 +03:30
|
|
|
namespace lt {
|
2025-07-05 13:28:41 +03:30
|
|
|
|
|
|
|
class glFramebuffer: public Framebuffer
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
glFramebuffer(const FramebufferSpecification &specification);
|
2025-07-05 16:07:51 +03:30
|
|
|
|
2025-07-14 08:45:09 +00:00
|
|
|
~glFramebuffer() override;
|
2025-07-05 13:28:41 +03:30
|
|
|
|
2025-07-17 10:44:00 +03:30
|
|
|
void bind_as_target(const math::vec4 &clearColor) override;
|
2025-07-05 16:07:51 +03:30
|
|
|
|
2025-07-05 15:36:53 +03:30
|
|
|
void bind_as_resource() override;
|
2025-07-05 13:28:41 +03:30
|
|
|
|
2025-07-17 10:44:00 +03:30
|
|
|
void resize(const math::uvec2 &size) override;
|
2025-07-05 13:28:41 +03:30
|
|
|
|
2025-07-06 14:02:50 +03:30
|
|
|
auto get_color_attachment() -> void * override
|
2025-07-05 13:28:41 +03:30
|
|
|
{
|
2025-07-05 14:23:01 +03:30
|
|
|
return (void *)m_color_attachment_id;
|
2025-07-05 13:28:41 +03:30
|
|
|
}
|
2025-07-05 16:07:51 +03:30
|
|
|
|
|
|
|
private:
|
|
|
|
FramebufferSpecification m_specification;
|
|
|
|
|
|
|
|
unsigned int m_buffer_id;
|
|
|
|
|
|
|
|
unsigned int m_color_attachment_id;
|
|
|
|
|
|
|
|
unsigned int m_depth_stencil_attachment_id;
|
2025-07-05 13:28:41 +03:30
|
|
|
};
|
|
|
|
|
2025-07-11 00:05:48 +03:30
|
|
|
} // namespace lt
|