From 3869b47c3545a2e463b154424e8a9342a0d46bca Mon Sep 17 00:00:00 2001 From: gurrgur <31393177+gurrgur@users.noreply.github.com> Date: Wed, 26 Oct 2022 14:07:34 +0200 Subject: [PATCH] OpenGL: Bind back buffer before clearing (#222) (#414) --- src/Cafe/HW/Latte/Renderer/OpenGL/OpenGLRenderer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Cafe/HW/Latte/Renderer/OpenGL/OpenGLRenderer.cpp b/src/Cafe/HW/Latte/Renderer/OpenGL/OpenGLRenderer.cpp index c72d52ca..45068615 100644 --- a/src/Cafe/HW/Latte/Renderer/OpenGL/OpenGLRenderer.cpp +++ b/src/Cafe/HW/Latte/Renderer/OpenGL/OpenGLRenderer.cpp @@ -548,6 +548,9 @@ void OpenGLRenderer::DrawBackbufferQuad(LatteTextureView* texView, RendererOutpu renderstate_resetDepthControl(); attributeStream_reset(); + // bind back buffer + rendertarget_bindFramebufferObject(nullptr); + if (clearBackground) { int windowWidth, windowHeight; @@ -559,9 +562,6 @@ void OpenGLRenderer::DrawBackbufferQuad(LatteTextureView* texView, RendererOutpu g_renderer->ClearColorbuffer(padView); } - // bind back buffer - rendertarget_bindFramebufferObject(nullptr); - // calculate effective size sint32 effectiveWidth; sint32 effectiveHeight;