Fixed mipmap chain generation for textures created with backbuffer ratio size.

This commit is contained in:
Branimir Karadžić
2016-07-21 12:57:14 -07:00
parent e65816831f
commit 08b5e9c851
8 changed files with 45 additions and 24 deletions

View File

@@ -2269,7 +2269,7 @@ namespace bgfx { namespace gl
}
}
void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height) BX_OVERRIDE
void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height, uint8_t _numMips) BX_OVERRIDE
{
TextureGL& texture = m_textures[_handle.idx];
@@ -2285,7 +2285,7 @@ namespace bgfx { namespace gl
tc.m_height = _height;
tc.m_sides = 0;
tc.m_depth = 0;
tc.m_numMips = 1;
tc.m_numMips = _numMips;
tc.m_format = TextureFormat::Enum(texture.m_requestedFormat);
tc.m_cubeMap = false;
tc.m_mem = NULL;