Revert "Fix setting the background color in OPENGL_GAL"
Causes flickering on some GPUs.
This reverts commit ca985791bc
.
This commit is contained in:
parent
94d8e1e69c
commit
e6cfb6af52
|
@ -285,7 +285,6 @@ void OPENGL_COMPOSITOR::SetBuffer( unsigned int aBufferHandle )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
glDrawBuffer( GL_FRONT_AND_BACK );
|
|
||||||
glViewport( 0, 0, GetScreenSize().x, GetScreenSize().y );
|
glViewport( 0, 0, GetScreenSize().x, GetScreenSize().y );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -294,7 +293,7 @@ void OPENGL_COMPOSITOR::SetBuffer( unsigned int aBufferHandle )
|
||||||
void OPENGL_COMPOSITOR::ClearBuffer()
|
void OPENGL_COMPOSITOR::ClearBuffer()
|
||||||
{
|
{
|
||||||
assert( m_initialized );
|
assert( m_initialized );
|
||||||
// Compositor requires transparent backgrounds to work correctly
|
|
||||||
glClearColor( 0.0f, 0.0f, 0.0f, 0.0f );
|
glClearColor( 0.0f, 0.0f, 0.0f, 0.0f );
|
||||||
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT );
|
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT );
|
||||||
}
|
}
|
||||||
|
@ -325,7 +324,7 @@ void OPENGL_COMPOSITOR::DrawBuffer( unsigned int aSourceHandle, unsigned int aDe
|
||||||
assert( aDestHandle <= usedBuffers() );
|
assert( aDestHandle <= usedBuffers() );
|
||||||
|
|
||||||
// Switch to the destination buffer and blit the scene
|
// Switch to the destination buffer and blit the scene
|
||||||
SetBuffer( aDestHandle );
|
SetBuffer ( aDestHandle );
|
||||||
|
|
||||||
// Depth test has to be disabled to make transparency working
|
// Depth test has to be disabled to make transparency working
|
||||||
glDisable( GL_DEPTH_TEST );
|
glDisable( GL_DEPTH_TEST );
|
||||||
|
|
|
@ -1031,6 +1031,7 @@ void OPENGL_GAL::Flush()
|
||||||
|
|
||||||
void OPENGL_GAL::ClearScreen( const COLOR4D& aColor )
|
void OPENGL_GAL::ClearScreen( const COLOR4D& aColor )
|
||||||
{
|
{
|
||||||
|
// Clear screen
|
||||||
compositor->SetBuffer( OPENGL_COMPOSITOR::DIRECT_RENDERING );
|
compositor->SetBuffer( OPENGL_COMPOSITOR::DIRECT_RENDERING );
|
||||||
glClearColor( aColor.r, aColor.g, aColor.b, aColor.a );
|
glClearColor( aColor.r, aColor.g, aColor.b, aColor.a );
|
||||||
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT );
|
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT );
|
||||||
|
|
Loading…
Reference in New Issue