GL: Fixed memory corruption.

This commit is contained in:
bkaradzic 2013-08-15 00:06:10 -07:00
parent 6d0ebf3103
commit 7bdae66027

View file

@ -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