Permalink
Browse files

OpenGL Renderer: Fix bug where rendering will fail for GPU drivers th…

…at support FBOs, but not Multisampled FBOs. (Regression from commit 5deec25.)
  • Loading branch information...
rogerman committed Jul 31, 2017
1 parent aead3f4 commit 7a018eb9c62b7bf7ec4d931e5eeb01d1c129d831
Showing with 3 additions and 3 deletions.
  1. +3 −3 desmume/src/OGLRender.cpp
@@ -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);
}

0 comments on commit 7a018eb

Please sign in to comment.