Commit 08d44648 authored by Alexander Larsson's avatar Alexander Larsson

opengl: Use proper blend function for premultiplied alpha

parent 72a6459d
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment