diff --git a/common/gal/opengl/opengl_compositor.cpp b/common/gal/opengl/opengl_compositor.cpp index aeb5c76e00..30b76626ab 100644 --- a/common/gal/opengl/opengl_compositor.cpp +++ b/common/gal/opengl/opengl_compositor.cpp @@ -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 ); } @@ -324,7 +325,7 @@ void OPENGL_COMPOSITOR::DrawBuffer( unsigned int aSourceHandle, unsigned int aDe assert( aDestHandle <= usedBuffers() ); // Switch to the destination buffer and blit the scene - SetBuffer ( aDestHandle ); + SetBuffer( aDestHandle ); // Depth test has to be disabled to make transparency working glDisable( GL_DEPTH_TEST ); diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index a2480411b5..17d380a753 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -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 );