diff pytouhou/ui/opengl/sprite.pyx @ 515:b3193b43a86c

Add an indirection layer for textures, to cope with drivers assigning them random names.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 06 Dec 2013 19:02:42 +0100
parents 3d4410de78e1
children 6e3b3d5d4691
line wrap: on
line diff
--- a/pytouhou/ui/opengl/sprite.pyx
+++ b/pytouhou/ui/opengl/sprite.pyx
@@ -65,7 +65,7 @@ cpdef tuple get_sprite_rendering_data(Sp
            ty * y_1 + toy,
            (ty + th) * y_1 + toy)
 
-    key = ((<Texture>sprite.anm.texture).texture << 1) | sprite.blendfunc
+    key = ((<Texture>sprite.anm.texture).key << 1) | sprite.blendfunc
     r, g, b = sprite.color
     values = tuple([x for x in vertmat.data[:12]]), uvs, (r, g, b, sprite.alpha)
     sprite._rendering_data = key, values