Fix setting the background color in OPENGL_GAL
Fixes: lp:1669098 * https://bugs.launchpad.net/kicad/+bug/1669098
This commit is contained in:
parent
458b0e75e0
commit
ca985791bc
|
@ -285,6 +285,7 @@ void OPENGL_COMPOSITOR::SetBuffer( unsigned int aBufferHandle )
|
|||
}
|
||||
else
|
||||
{
|
||||
glDrawBuffer( GL_FRONT_AND_BACK );
|
||||
glViewport( 0, 0, GetScreenSize().x, GetScreenSize().y );
|
||||
}
|
||||
}
|
||||
|
@ -293,7 +294,7 @@ void OPENGL_COMPOSITOR::SetBuffer( unsigned int aBufferHandle )
|
|||
void OPENGL_COMPOSITOR::ClearBuffer()
|
||||
{
|
||||
assert( m_initialized );
|
||||
|
||||
// Compositor requires transparent backgrounds to work correctly
|
||||
glClearColor( 0.0f, 0.0f, 0.0f, 0.0f );
|
||||
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT );
|
||||
}
|
||||
|
|
|
@ -1031,7 +1031,6 @@ void OPENGL_GAL::Flush()
|
|||
|
||||
void OPENGL_GAL::ClearScreen( const COLOR4D& aColor )
|
||||
{
|
||||
// Clear screen
|
||||
compositor->SetBuffer( OPENGL_COMPOSITOR::DIRECT_RENDERING );
|
||||
glClearColor( aColor.r, aColor.g, aColor.b, aColor.a );
|
||||
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT );
|
||||
|
|
Loading…
Reference in New Issue