OpenGL Renderer: Fix bug where rendering will fail for GPU drivers that support FBOs, but not Multisampled FBOs. (Regression from commit 5deec25.)

This commit is contained in:
rogerman 2017-07-31 07:03:27 -07:00
parent aead3f4109
commit 7a018eb9c6
1 changed files with 3 additions and 3 deletions

View File

@ -3163,7 +3163,7 @@ Render3DError OpenGLRenderer_1_2::DownsampleFBO()
{
OGLRenderRef &OGLRef = *this->ref;
if (this->isMultisampledFBOSupported && OGLRef.selectedRenderingFBO == OGLRef.fboMSIntermediateRenderID)
if (this->isMultisampledFBOSupported && (OGLRef.selectedRenderingFBO == OGLRef.fboMSIntermediateRenderID))
{
glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, OGLRef.fboMSIntermediateRenderID);
glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, OGLRef.fboRenderID);
@ -3900,9 +3900,9 @@ Render3DError OpenGLRenderer_1_2::ClearUsingValues(const FragmentColor &clearCol
{
OGLRenderRef &OGLRef = *this->ref;
if (this->isMultisampledFBOSupported)
if (this->isFBOSupported)
{
OGLRef.selectedRenderingFBO = (CommonSettings.GFX3D_Renderer_Multisample) ? OGLRef.fboMSIntermediateRenderID : OGLRef.fboRenderID;
OGLRef.selectedRenderingFBO = (CommonSettings.GFX3D_Renderer_Multisample && this->isMultisampledFBOSupported) ? OGLRef.fboMSIntermediateRenderID : OGLRef.fboRenderID;
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, OGLRef.selectedRenderingFBO);
}