Sfoglia il codice sorgente

Fixed framebuffer size.

bkaradzic 12 anni fa
parent
commit
cf940331d6
1 ha cambiato i file con 6 aggiunte e 6 eliminazioni
  1. 6 6
      src/renderer_gl.cpp

+ 6 - 6
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