Fixed framebuffer size.

This commit is contained in:
bkaradzic 2014-02-24 22:10:19 -08:00
parent 7ad942b14b
commit cf940331d6

View file

@ -2158,6 +2158,12 @@ namespace bgfx
{ {
const Texture& texture = s_renderCtx->m_textures[handle.idx]; 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; GLenum attachment = GL_COLOR_ATTACHMENT0 + colorIdx;
if (isDepth( (TextureFormat::Enum)texture.m_textureFormat) ) if (isDepth( (TextureFormat::Enum)texture.m_textureFormat) )
{ {
@ -2168,12 +2174,6 @@ namespace bgfx
++colorIdx; ++colorIdx;
} }
if (0 == colorIdx)
{
m_width = texture.m_width;
m_height = texture.m_height;
}
if (0 != texture.m_rbo) if (0 != texture.m_rbo)
{ {
GL_CHECK(glFramebufferRenderbuffer(GL_FRAMEBUFFER GL_CHECK(glFramebufferRenderbuffer(GL_FRAMEBUFFER