OpenGL: Bind back buffer before clearing (#222) (#414)

This commit is contained in:
gurrgur 2022-10-26 14:07:34 +02:00 committed by GitHub
parent d303a7f502
commit 3869b47c35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;