changeset 148:6460814b68ea

Work around a bug in nouveau
author Thibaut Girka <thib@sitedethib.com>
date Tue, 04 Oct 2011 17:52:37 +0200
parents a61c96265779
children 3673d55a8448
files pytouhou/opengl/gamerenderer.pyx
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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, <long> &self.vertex_buffer[0].x)
-        glTexCoordPointer(2, GL_FLOAT, 24, <long> &self.vertex_buffer[0].u)
-        glColorPointer(4, GL_UNSIGNED_BYTE, 24, <long> &self.vertex_buffer[0].r)
+        for (texture_key, blendfunc), indices in indices_by_texture.items():
+            glVertexPointer(3, GL_FLOAT, 24, <long> &self.vertex_buffer[0].x)
+            glTexCoordPointer(2, GL_FLOAT, 24, <long> &self.vertex_buffer[0].u)
+            glColorPointer(4, GL_UNSIGNED_BYTE, 24, <long> &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])