Use GL_ONE for the source in glBendFunc instead of pre-unmultiplying.

Eventually we need to allow both pre-multiplied alpha and not, but for now default to premultiplied.
This commit is contained in:
Kristian Høgsberg 2008-11-03 06:35:46 -05:00
parent 61017b190a
commit 3f59e82c20
4 changed files with 3 additions and 91 deletions

View file

@ -68,7 +68,9 @@ repaint(void *data)
glBindTexture(GL_TEXTURE_2D, sd->texture);
glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
/* Assume pre-multiplied alpha for now, this probably
* needs to be a wayland visual type of thing. */
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);