imgui: clear color buffer before drawing background tex

fixes blinking edges on nvidia shield and other glitches
This commit is contained in:
Flyinghead 2019-04-07 23:33:24 +02:00
parent 4b7e4f4677
commit 408d16b299
1 changed files with 3 additions and 5 deletions

View File

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