summaryrefslogtreecommitdiff
path: root/src/render/gl/GLFramebuffer.hpp
diff options
context:
space:
mode:
authorUjinT34 <41110182+UjinT34@users.noreply.github.com>2026-03-29 00:41:45 +0300
committerGitHub <noreply@github.com>2026-03-28 21:41:45 +0000
commit38a7f03cf0e5ee116794a78581634ba3dab508fa (patch)
tree969891411b2af4e437a183004018cfc359a3057e /src/render/gl/GLFramebuffer.hpp
parentef2e8dfd5f7e6ee55fa7bc48e44974e64938d14a (diff)
renderer: refactor part 7: api fixes (#13631)
Part 7 of ujin's refactors --------- Co-authored-by: Vaxry <vaxry@vaxry.net>
Diffstat (limited to 'src/render/gl/GLFramebuffer.hpp')
-rw-r--r--src/render/gl/GLFramebuffer.hpp38
1 files changed, 20 insertions, 18 deletions
diff --git a/src/render/gl/GLFramebuffer.hpp b/src/render/gl/GLFramebuffer.hpp
index c171444e..1be5d0e0 100644
--- a/src/render/gl/GLFramebuffer.hpp
+++ b/src/render/gl/GLFramebuffer.hpp
@@ -5,26 +5,28 @@
#include "../Framebuffer.hpp"
#include <drm_fourcc.h>
-class CGLFramebuffer : public IFramebuffer {
- public:
- CGLFramebuffer();
- CGLFramebuffer(const std::string& name);
- ~CGLFramebuffer();
+namespace Render::GL {
+ class CGLFramebuffer : public IFramebuffer {
+ public:
+ CGLFramebuffer();
+ CGLFramebuffer(const std::string& name);
+ ~CGLFramebuffer();
- void addStencil(SP<ITexture> tex) override;
- void release() override;
- bool readPixels(CHLBufferReference buffer, uint32_t offsetX = 0, uint32_t offsetY = 0, uint32_t width = 0, uint32_t height = 0) override;
+ void addStencil(SP<ITexture> tex) override;
+ void release() override;
+ bool readPixels(CHLBufferReference buffer, uint32_t offsetX = 0, uint32_t offsetY = 0, uint32_t width = 0, uint32_t height = 0) override;
- void bind() override;
- void unbind();
- GLuint getFBID();
- void invalidate(const std::vector<GLenum>& attachments);
+ void bind() override;
+ void unbind();
+ GLuint getFBID();
+ void invalidate(const std::vector<GLenum>& attachments);
- protected:
- bool internalAlloc(int w, int h, uint32_t format = DRM_FORMAT_ARGB8888) override;
+ protected:
+ bool internalAlloc(int w, int h, DRMFormat format = DRM_FORMAT_ARGB8888) override;
- private:
- GLuint m_fb = -1;
+ private:
+ GLuint m_fb = -1;
- friend class CGLRenderbuffer;
-};
+ friend class CGLRenderbuffer;
+ };
+}