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