# HG changeset patch # User Thibaut Girka # Date 1317743557 -7200 # Node ID 6460814b68ea7b4eaa458ce7d8d94e1becab77ee # Parent a61c962657799097274d90a45f24777910436f64 Work around a bug in nouveau diff --git a/pytouhou/opengl/gamerenderer.pyx b/pytouhou/opengl/gamerenderer.pyx --- a/pytouhou/opengl/gamerenderer.pyx +++ b/pytouhou/opengl/gamerenderer.pyx @@ -85,11 +85,11 @@ cdef class GameRenderer: nb_vertices += 4 - glVertexPointer(3, GL_FLOAT, 24, &self.vertex_buffer[0].x) - glTexCoordPointer(2, GL_FLOAT, 24, &self.vertex_buffer[0].u) - glColorPointer(4, GL_UNSIGNED_BYTE, 24, &self.vertex_buffer[0].r) + for (texture_key, blendfunc), indices in indices_by_texture.items(): + glVertexPointer(3, GL_FLOAT, 24, &self.vertex_buffer[0].x) + glTexCoordPointer(2, GL_FLOAT, 24, &self.vertex_buffer[0].u) + glColorPointer(4, GL_UNSIGNED_BYTE, 24, &self.vertex_buffer[0].r) - for (texture_key, blendfunc), indices in indices_by_texture.items(): nb_indices = len(indices) indices = struct.pack(str(nb_indices) + 'H', *indices) glBlendFunc(GL_SRC_ALPHA, (GL_ONE_MINUS_SRC_ALPHA, GL_ONE)[blendfunc])