diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index 25bf1d9e4..5efdb43dc 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -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