| 4174 | } |
| 4175 | |
| 4176 | void setRenderContextSize(const Resolution& _resolution) |
| 4177 | { |
| 4178 | if (!m_glctx.isValid() ) |
| 4179 | { |
| 4180 | m_glctx.create(_resolution); |
| 4181 | } |
| 4182 | else |
| 4183 | { |
| 4184 | destroyMsaaFbo(); |
| 4185 | |
| 4186 | m_glctx.resize(_resolution); |
| 4187 | |
| 4188 | uint32_t msaa = (_resolution.reset & BGFX_RESET_MSAA_MASK)>>BGFX_RESET_MSAA_SHIFT; |
| 4189 | msaa = bx::uint32_min(m_maxMsaa, msaa == 0 ? 0 : 1<<msaa); |
| 4190 | |
| 4191 | createMsaaFbo(_resolution.width, _resolution.height, msaa); |
| 4192 | } |
| 4193 | |
| 4194 | m_flip = true; |
| 4195 | } |
| 4196 | |
| 4197 | void invalidateCache() |
| 4198 | { |