[gtk+] opengl: Use proper blend function for premultiplied alpha



commit 08d44648ea9378d62f0fa95995bbcc33d4cc338e
Author: Alexander Larsson <alexl redhat com>
Date:   Mon Oct 27 21:13:28 2014 +0100

    opengl: Use proper blend function for premultiplied alpha

 gdk/gdkwindow.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 676a816..c0186aa 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -2913,8 +2913,9 @@ gdk_window_begin_paint_region (GdkWindow       *window,
           glClearColor (0.0f, 0.0f, 0.0f, 0.0f);
           glDisable (GL_DEPTH_TEST);
           glDisable(GL_BLEND);
-          glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+          glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
           glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
+
           glViewport (0, 0, ww, wh);
 
           glMatrixMode (GL_PROJECTION);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]