diff pytouhou/ui/opengl/background.pyx @ 586:4b0593da29d5

Simplify framebuffer rendering with glDrawArrays, and move it all to its own file.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 08 Oct 2014 16:34:24 +0200
parents e0166cda75d5
children 974decb8df4f
line wrap: on
line diff
--- a/pytouhou/ui/opengl/background.pyx
+++ b/pytouhou/ui/opengl/background.pyx
@@ -109,7 +109,7 @@ cdef class BackgroundRenderer:
             glPopDebugGroup()
 
 
-    cdef void load(self, background, Renderer renderer):
+    cdef void load(self, background, GLuint[MAX_TEXTURES] textures):
         cdef float ox, oy, oz, ox2, oy2, oz2
         cdef GLsizei nb_vertices = 0, nb_indices = 0
 
@@ -153,7 +153,7 @@ cdef class BackgroundRenderer:
         # either in RAM or in VRAM, they will never change until we implement
         # background animation.
 
-        self.texture = renderer.textures[key >> 1]
+        self.texture = textures[key >> 1]
         self.nb_indices = nb_indices
 
         if is_legacy: