changeset 539:d6d9a711253d

Fix text sometimes being drawn with a wrong blend func.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Tue, 06 May 2014 20:12:08 +0200
parents 1abb6f7db8cc
children 53fa73932e9a
files pytouhou/ui/opengl/renderer.pyx
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pytouhou/ui/opengl/renderer.pyx
+++ b/pytouhou/ui/opengl/renderer.pyx
@@ -237,6 +237,7 @@ cdef class Renderer:
             glVertexAttribPointer(2, 4, GL_UNSIGNED_BYTE, True, sizeof(Vertex), <void*>16)
             glEnableVertexAttribArray(2)
 
+        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
         glBindTexture(GL_TEXTURE_2D, texture)
         glDrawElements(GL_TRIANGLES, 6 * length, GL_UNSIGNED_SHORT, indices)