diff options
| author | Ryan Houdek <Sonicadvance1@gmail.com> | 2014-08-28 10:29:03 -0500 |
|---|---|---|
| committer | Ryan Houdek <Sonicadvance1@gmail.com> | 2014-08-28 10:29:03 -0500 |
| commit | c908a1e212dfe80bd04cdd19b9fc419001aa8bfc (patch) | |
| tree | 015ab08987818b7a7583e8f72067911995d88e65 /Source/Core/VideoBackends/OGL/PostProcessing.cpp | |
| parent | 8e7d7418af8d089b16cd0206290106355a408526 (diff) | |
| parent | ca68526ec776069669cf4fa0f11a917d9a9db877 (diff) | |
Merge pull request #882 from Sonicadvance1/fix-pp-blackness
Fix PostProcessing shader garbage on screen.
Diffstat (limited to 'Source/Core/VideoBackends/OGL/PostProcessing.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/OGL/PostProcessing.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Source/Core/VideoBackends/OGL/PostProcessing.cpp b/Source/Core/VideoBackends/OGL/PostProcessing.cpp index 311756d063..648ed5c76a 100644 --- a/Source/Core/VideoBackends/OGL/PostProcessing.cpp +++ b/Source/Core/VideoBackends/OGL/PostProcessing.cpp @@ -55,7 +55,17 @@ OpenGLPostProcessing::~OpenGLPostProcessing() void OpenGLPostProcessing::BindTargetFramebuffer() { - glBindFramebuffer(GL_DRAW_FRAMEBUFFER, m_enable ? m_fbo : 0); + if (m_enable) + { + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, m_fbo); + // Clear the buffer so there isn't any remaining garbage from the previous post processing shader frame + glClear(GL_COLOR_BUFFER_BIT); + } + else + { + // Bind to default framebuffer if we aren't post processing + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); + } } void OpenGLPostProcessing::BlitToScreen() |
