From 408d16b2993302b1c5384b4876cf7e14df328d01 Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Sun, 7 Apr 2019 23:33:24 +0200 Subject: [PATCH] imgui: clear color buffer before drawing background tex fixes blinking edges on nvidia shield and other glitches --- core/rend/gles/imgui_impl_opengl3.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core/rend/gles/imgui_impl_opengl3.cpp b/core/rend/gles/imgui_impl_opengl3.cpp index 853e41563..ddb363c1c 100644 --- a/core/rend/gles/imgui_impl_opengl3.cpp +++ b/core/rend/gles/imgui_impl_opengl3.cpp @@ -510,6 +510,9 @@ void ImGui_ImplOpenGL3_DestroyDeviceObjects() void ImGui_ImplOpenGL3_DrawBackground() { + glcache.Disable(GL_SCISSOR_TEST); + glcache.ClearColor(0, 0, 0, 0); + glClear(GL_COLOR_BUFFER_BIT); if (g_BackgroundTexture != 0) { ImGuiIO& io = ImGui::GetIO(); @@ -520,11 +523,6 @@ void ImGui_ImplOpenGL3_DrawBackground() ImGui::GetWindowDrawList()->AddImage((ImTextureID)(uintptr_t)g_BackgroundTexture, ImVec2(0, 0), io.DisplaySize, ImVec2(0, 1), ImVec2(1, 0), 0xffffffff); ImGui::End(); } - else - { - glcache.ClearColor(0, 0, 0, 0); - glClear(GL_COLOR_BUFFER_BIT); - } } ImTextureID ImGui_ImplOpenGL3_CreateVmuTexture(const unsigned int *data)