OpenGL Renderer: Improve robustness when changing the MSAA sample size.

This commit is contained in:
rogerman 2018-10-23 00:04:28 -07:00
parent d85f140b64
commit ff84420424
1 changed files with 7 additions and 0 deletions

View File

@ -1956,8 +1956,15 @@ Render3DError OpenGLRenderer::ApplyRenderingSettings(const GFX3D_State &renderSt
if (this->_selectedMultisampleSize != oldSelectedMultisampleSize)
{
if (!BEGINGL())
{
return OGLERROR_BEGINGL_FAILED;
}
GLsizei sampleSize = this->GetLimitedMultisampleSize();
this->ResizeMultisampledFBOs(sampleSize);
ENDGL();
}
return Render3D::ApplyRenderingSettings(renderState);