opengl: Use proper blend function for premultiplied alpha

This commit is contained in:
Alexander Larsson 2014-10-27 21:13:28 +01:00
parent 72a6459d73
commit 08d44648ea

View File

@ -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);