From edc43c19cdf03df20102abd132451eb5479e8709 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 29 Oct 2013 17:53:47 +0100 Subject: [PATCH] Fix colorized framebuffer output on some GPUs. --- common/gal/opengl/opengl_gal.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index aa4bc86a39..7f63b79bea 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -215,6 +215,9 @@ void OPENGL_GAL::EndDrawing() compositor.SetBuffer( overlayBuffer ); overlayManager.EndDrawing(); + // Be sure that the framebuffer is not colorized (happens on specific GPU&drivers combinations) + glColor4d( 1.0, 1.0, 1.0, 1.0 ); + // Draw the remaining contents, blit the rendering targets to the screen, swap the buffers compositor.DrawBuffer( mainBuffer ); compositor.DrawBuffer( overlayBuffer ); @@ -980,9 +983,6 @@ void OPENGL_GAL::blitCursor() glVertex2d( cursorBegin.x, cursorCenter.y ); glVertex2d( cursorEnd.x, cursorCenter.y ); glEnd(); - - // Restore the default color, so textures will be drawn properly - glColor4d( 1.0, 1.0, 1.0, 1.0 ); }