summaryrefslogtreecommitdiff
path: root/src/managers/screenshare/CursorshareSession.cpp
diff options
context:
space:
mode:
authorUjinT34 <41110182+UjinT34@users.noreply.github.com>2026-03-07 00:44:10 +0300
committerGitHub <noreply@github.com>2026-03-06 21:44:10 +0000
commit4152ac76d0813d9d0f67d2f04653a13fa6e17433 (patch)
treec341f1883cf5a182d32e4ad00192ba8786a9bb75 /src/managers/screenshare/CursorshareSession.cpp
parenta5858018d896e0e0f0db517f893cd9a0936dd881 (diff)
renderer: refactor Texture, Framebuffer and Renderbuffer (#13437)
Part 1 of the renderer refactors
Diffstat (limited to 'src/managers/screenshare/CursorshareSession.cpp')
-rw-r--r--src/managers/screenshare/CursorshareSession.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/managers/screenshare/CursorshareSession.cpp b/src/managers/screenshare/CursorshareSession.cpp
index 2322625f..703832ab 100644
--- a/src/managers/screenshare/CursorshareSession.cpp
+++ b/src/managers/screenshare/CursorshareSession.cpp
@@ -169,10 +169,10 @@ bool CCursorshareSession::copy() {
return false;
}
- CFramebuffer outFB;
- outFB.alloc(m_bufferSize.x, m_bufferSize.y, m_format);
+ auto outFB = g_pHyprRenderer->createFB();
+ outFB->alloc(m_bufferSize.x, m_bufferSize.y, m_format);
- if (!g_pHyprRenderer->beginRender(m_pendingFrame.monitor, fakeDamage, RENDER_MODE_FULL_FAKE, nullptr, &outFB, true)) {
+ if (!g_pHyprRenderer->beginRender(m_pendingFrame.monitor, fakeDamage, RENDER_MODE_FULL_FAKE, nullptr, outFB, true)) {
LOGM(Log::ERR, "Can't copy: failed to begin rendering to shm");
return false;
}
@@ -182,8 +182,8 @@ bool CCursorshareSession::copy() {
g_pHyprRenderer->endRender();
g_pHyprOpenGL->m_renderData.pMonitor = m_pendingFrame.monitor;
- outFB.bind();
- glBindFramebuffer(GL_READ_FRAMEBUFFER, outFB.getFBID());
+ outFB->bind();
+ glBindFramebuffer(GL_READ_FRAMEBUFFER, GLFB(outFB)->getFBID());
glPixelStorei(GL_PACK_ALIGNMENT, 1);
@@ -212,7 +212,7 @@ bool CCursorshareSession::copy() {
g_pHyprOpenGL->m_renderData.pMonitor.reset();
m_pendingFrame.buffer->endDataPtr();
- outFB.unbind();
+ GLFB(outFB)->unbind();
glPixelStorei(GL_PACK_ALIGNMENT, 4);
glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);