From 968920098481fd5f7eb865262060f2a98f17e34a Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Sat, 6 Jan 2018 09:47:17 -0500 Subject: [PATCH] OpenGL: Fix background color being drawn twice in no-AA mode Fixes: lp:1741363 * https://bugs.launchpad.net/kicad/+bug/1741363 --- common/gal/opengl/opengl_gal.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 729c103c8f..ec98fe7718 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -1189,7 +1189,8 @@ void OPENGL_GAL::ClearScreen( ) { // Clear screen compositor->SetBuffer( OPENGL_COMPOSITOR::DIRECT_RENDERING ); - glClearColor( m_clearColor.r, m_clearColor.g, m_clearColor.b, m_clearColor.a ); + // NOTE: Black used here instead of m_clearColor; it will be composited later + glClearColor( 0, 0, 0, 1 ); glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT ); }