aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTom Englund <[email protected]>2024-08-16 11:09:01 +0200
committerGitHub <[email protected]>2024-08-16 10:09:01 +0100
commit1840a907a8c6b1f59cfa6738a8f46b320e8df8b1 (patch)
treec5453fc927d9d0baeafdc11bbb1d612af1aee1d3
parent682b30fba89c043e86d9c96bdb8df133c1683054 (diff)
downloadHyprland-1840a907a8c6b1f59cfa6738a8f46b320e8df8b1.tar.gz
Hyprland-1840a907a8c6b1f59cfa6738a8f46b320e8df8b1.zip
renderbuffer: ensure framebuffer gets deleted (#7363)
after commit 4b4971c it uses m_iFbAllocated and deletes if upon calling release() but Renderbuffer generates directly on m_iFb without calling alloc() meaning it wont be deleted on release(), set m_iFbAllocated to true after generating the buffer.
-rw-r--r--src/render/Renderbuffer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/render/Renderbuffer.cpp b/src/render/Renderbuffer.cpp
index 58ed88d6..c4425ce9 100644
--- a/src/render/Renderbuffer.cpp
+++ b/src/render/Renderbuffer.cpp
@@ -35,7 +35,8 @@ CRenderbuffer::CRenderbuffer(SP<Aquamarine::IBuffer> buffer, uint32_t format) :
glBindRenderbuffer(GL_RENDERBUFFER, 0);
glGenFramebuffers(1, &m_sFramebuffer.m_iFb);
- m_sFramebuffer.m_vSize = buffer->size;
+ m_sFramebuffer.m_iFbAllocated = true;
+ m_sFramebuffer.m_vSize = buffer->size;
m_sFramebuffer.bind();
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, m_iRBO);