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
1 changed files with 3 additions and 3 deletions

View File

@ -548,6 +548,9 @@ void OpenGLRenderer::DrawBackbufferQuad(LatteTextureView* texView, RendererOutpu
renderstate_resetDepthControl(); renderstate_resetDepthControl();
attributeStream_reset(); attributeStream_reset();
// bind back buffer
rendertarget_bindFramebufferObject(nullptr);
if (clearBackground) if (clearBackground)
{ {
int windowWidth, windowHeight; int windowWidth, windowHeight;
@ -559,9 +562,6 @@ void OpenGLRenderer::DrawBackbufferQuad(LatteTextureView* texView, RendererOutpu
g_renderer->ClearColorbuffer(padView); g_renderer->ClearColorbuffer(padView);
} }
// bind back buffer
rendertarget_bindFramebufferObject(nullptr);
// calculate effective size // calculate effective size
sint32 effectiveWidth; sint32 effectiveWidth;
sint32 effectiveHeight; sint32 effectiveHeight;