Mercurial > touhou
diff pytouhou/ui/background.pyx @ 505:bfea9e9a6845
Manage the texture-specific indices in the Texture, and some more renderer optimisations.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Fri, 01 Nov 2013 14:45:53 +0100 |
parents | 6e733ed817bd |
children |
line wrap: on
line diff
--- a/pytouhou/ui/background.pyx +++ b/pytouhou/ui/background.pyx @@ -92,8 +92,8 @@ cdef class BackgroundRenderer: nb_vertices += 4 - self.texture = key % MAX_TEXTURES - self.blendfunc = key // MAX_TEXTURES + self.texture = key >> 1 + self.blendfunc = key & 1 self.nb_vertices = nb_vertices self.vertex_buffer = <Vertex*> realloc(vertex_buffer, nb_vertices * sizeof(Vertex))