Fixed issue#48. Passing bad MSAA value to glRenderbufferStorage.

This commit is contained in:
bkaradzic 2013-12-11 21:09:18 -08:00
parent 492e99e1c3
commit 1a6300b6c4

View file

@ -534,7 +534,7 @@ namespace bgfx
m_resolution = _resolution; m_resolution = _resolution;
uint32_t msaa = 1<<( (m_resolution.m_flags&BGFX_RESET_MSAA_MASK)>>BGFX_RESET_MSAA_SHIFT); uint32_t msaa = (m_resolution.m_flags&BGFX_RESET_MSAA_MASK)>>BGFX_RESET_MSAA_SHIFT;
msaa = bx::uint32_min(m_maxMsaa, msaa == 0 ? 0 : 1<<msaa); msaa = bx::uint32_min(m_maxMsaa, msaa == 0 ? 0 : 1<<msaa);
bool vsync = !!(m_resolution.m_flags&BGFX_RESET_VSYNC); bool vsync = !!(m_resolution.m_flags&BGFX_RESET_VSYNC);
setRenderContextSize(_resolution.m_width, _resolution.m_height, msaa, vsync); setRenderContextSize(_resolution.m_width, _resolution.m_height, msaa, vsync);