diff options
author | Alexander Larsson <alexl@redhat.com> | 2014-10-27 21:13:28 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2014-10-27 21:17:08 +0100 |
commit | 08d44648ea9378d62f0fa95995bbcc33d4cc338e (patch) | |
tree | 5aaeedb0045f9d0e59bb0ab0f1dc5b365352d544 /gdk/gdkwindow.c | |
parent | 72a6459d73ed2af6cc032a7fc0c1704c9ed6faba (diff) | |
download | gtk+-08d44648ea9378d62f0fa95995bbcc33d4cc338e.tar.gz |
opengl: Use proper blend function for premultiplied alpha
Diffstat (limited to 'gdk/gdkwindow.c')
-rw-r--r-- | gdk/gdkwindow.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index 676a816be3..c0186aa74f 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); |