From cf940331d6f26589e0f37114c4f7fce1d230a021 Mon Sep 17 00:00:00 2001 From: bkaradzic Date: Mon, 24 Feb 2014 22:10:19 -0800 Subject: [PATCH] Fixed framebuffer size. --- src/renderer_gl.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index 8afcff21..28f49fc6 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -2158,6 +2158,12 @@ namespace bgfx { const Texture& texture = s_renderCtx->m_textures[handle.idx]; + if (0 == colorIdx) + { + m_width = texture.m_width; + m_height = texture.m_height; + } + GLenum attachment = GL_COLOR_ATTACHMENT0 + colorIdx; if (isDepth( (TextureFormat::Enum)texture.m_textureFormat) ) { @@ -2168,12 +2174,6 @@ namespace bgfx ++colorIdx; } - if (0 == colorIdx) - { - m_width = texture.m_width; - m_height = texture.m_height; - } - if (0 != texture.m_rbo) { GL_CHECK(glFramebufferRenderbuffer(GL_FRAMEBUFFER