2023-11-24 11:54:21 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Framebuffer.hpp"
|
|
|
|
|
|
|
|
class CMonitor;
|
2024-06-08 10:07:59 +02:00
|
|
|
class IWLBuffer;
|
2023-11-24 11:54:21 +01:00
|
|
|
|
|
|
|
class CRenderbuffer {
|
|
|
|
public:
|
|
|
|
CRenderbuffer(wlr_buffer* buffer, uint32_t format);
|
2024-06-08 10:07:59 +02:00
|
|
|
CRenderbuffer(SP<IWLBuffer> buffer, uint32_t format);
|
2023-11-24 11:54:21 +01:00
|
|
|
~CRenderbuffer();
|
|
|
|
|
|
|
|
void bind();
|
|
|
|
void bindFB();
|
|
|
|
void unbind();
|
|
|
|
CFramebuffer* getFB();
|
2024-05-05 23:18:10 +02:00
|
|
|
uint32_t getFormat();
|
2023-11-24 11:54:21 +01:00
|
|
|
|
|
|
|
wlr_buffer* m_pWlrBuffer = nullptr;
|
2024-06-08 10:07:59 +02:00
|
|
|
WP<IWLBuffer> m_pHLBuffer = {};
|
2023-11-24 11:54:21 +01:00
|
|
|
|
|
|
|
DYNLISTENER(destroyBuffer);
|
|
|
|
|
|
|
|
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;
|
2023-11-24 11:54:21 +01:00
|
|
|
};
|