mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
GL: Fixed memory corruption.
This commit is contained in:
parent
6d0ebf3103
commit
7bdae66027
1 changed files with 2 additions and 2 deletions
|
@ -548,7 +548,7 @@ namespace bgfx
|
|||
{
|
||||
GL_CHECK(glGenFramebuffers(1, &m_msaaBackBufferFbo) );
|
||||
GL_CHECK(glBindFramebuffer(GL_FRAMEBUFFER, m_msaaBackBufferFbo) );
|
||||
GL_CHECK(glGenRenderbuffers(3, m_msaaBackBufferRbos) );
|
||||
GL_CHECK(glGenRenderbuffers(BX_COUNTOF(m_msaaBackBufferRbos), m_msaaBackBufferRbos) );
|
||||
GL_CHECK(glBindRenderbuffer(GL_RENDERBUFFER, m_msaaBackBufferRbos[0]) );
|
||||
GL_CHECK(glRenderbufferStorageMultisample(GL_RENDERBUFFER, _msaa, GL_RGBA8, _width, _height) );
|
||||
GL_CHECK(glBindRenderbuffer(GL_RENDERBUFFER, m_msaaBackBufferRbos[1]) );
|
||||
|
@ -576,7 +576,7 @@ namespace bgfx
|
|||
if (0 != m_msaaBackBufferFbo)
|
||||
{
|
||||
GL_CHECK(glDeleteFramebuffers(1, &m_msaaBackBufferFbo) );
|
||||
GL_CHECK(glDeleteRenderbuffers(3, m_msaaBackBufferRbos) );
|
||||
GL_CHECK(glDeleteRenderbuffers(BX_COUNTOF(m_msaaBackBufferRbos), m_msaaBackBufferRbos) );
|
||||
m_msaaBackBufferFbo = 0;
|
||||
}
|
||||
#endif // BGFX_CONFIG_RENDERER_OPENGL|BGFX_CONFIG_RENDERER_OPENGLES3
|
||||
|
|
Loading…
Reference in a new issue