Hyprland/src/render/Renderbuffer.hpp

30 lines
678 B
C++
Raw Normal View History

#pragma once
#include "Framebuffer.hpp"
2024-06-20 18:05:35 +02:00
#include <aquamarine/buffer/Buffer.hpp>
class CMonitor;
class CRenderbuffer {
public:
2024-06-20 18:05:35 +02:00
CRenderbuffer(SP<Aquamarine::IBuffer> buffer, uint32_t format);
~CRenderbuffer();
2024-06-20 18:05:35 +02:00
void bind();
void bindFB();
void unbind();
CFramebuffer* getFB();
uint32_t getFormat();
2024-06-20 18:05:35 +02:00
WP<Aquamarine::IBuffer> m_pHLBuffer;
private:
2024-07-05 20:32:36 +02:00
void* m_iImage = nullptr;
GLuint m_iRBO = 0;
CFramebuffer m_sFramebuffer;
uint32_t m_uDrmFormat = 0;
2024-06-20 18:05:35 +02:00
struct {
CHyprSignalListener destroyBuffer;
} listeners;
};