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.
This commit is contained in:
Tom Englund 2024-08-16 11:09:01 +02:00 committed by GitHub
parent 682b30fba8
commit 1840a907a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -35,7 +35,8 @@ CRenderbuffer::CRenderbuffer(SP<Aquamarine::IBuffer> buffer, uint32_t format) :
glBindRenderbuffer(GL_RENDERBUFFER, 0); glBindRenderbuffer(GL_RENDERBUFFER, 0);
glGenFramebuffers(1, &m_sFramebuffer.m_iFb); 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(); m_sFramebuffer.bind();
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, m_iRBO); glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, m_iRBO);