diff options
| author | Tilka <tilkax@gmail.com> | 2018-10-11 13:00:17 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-11 13:00:17 +0100 |
| commit | b35e0fd45678ffc6b77c490fc906f5cff7d2e495 (patch) | |
| tree | 4e7440eb107458e4a6af04d2cbd4341a499f221a /Source/Core/VideoBackends/OGL/OGLTexture.cpp | |
| parent | f8c679bab962e79a3aa2cf5990f542dbcf4caf74 (diff) | |
| parent | 2e905455b152129e4efc0e95f104bf65dfdfdf7d (diff) | |
Merge pull request #7451 from stenzek/gles-blit-scissor
OGL: Disable scissor test when calling glBlitFramebuffer()
Diffstat (limited to 'Source/Core/VideoBackends/OGL/OGLTexture.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/OGL/OGLTexture.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/Core/VideoBackends/OGL/OGLTexture.cpp b/Source/Core/VideoBackends/OGL/OGLTexture.cpp index 5399a11d04..1efb650eeb 100644 --- a/Source/Core/VideoBackends/OGL/OGLTexture.cpp +++ b/Source/Core/VideoBackends/OGL/OGLTexture.cpp @@ -234,6 +234,9 @@ void OGLTexture::BlitFramebuffer(OGLTexture* srcentry, const MathUtil::Rectangle dst_layer); } + // glBlitFramebuffer is still affected by the scissor test, which is enabled by default. + glDisable(GL_SCISSOR_TEST); + glBlitFramebuffer(src_rect.left, src_rect.top, src_rect.right, src_rect.bottom, dst_rect.left, dst_rect.top, dst_rect.right, dst_rect.bottom, GL_COLOR_BUFFER_BIT, GL_NEAREST); @@ -252,6 +255,9 @@ void OGLTexture::BlitFramebuffer(OGLTexture* srcentry, const MathUtil::Rectangle 0); } + // The default state for the scissor test is enabled. We don't need to do a full state + // restore, as the framebuffer and scissor test are the only things we changed. + glEnable(GL_SCISSOR_TEST); FramebufferManager::SetFramebuffer(0); } |
