diff pytouhou/ui/renderer.pyx @ 503:c622eaf64428

Optimize GameRunner some more, fix replay, and remove Window dependency in Renderer.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 04 Oct 2013 14:27:11 +0200
parents feecdb4a8928
children bfea9e9a6845
line wrap: on
line diff
--- a/pytouhou/ui/renderer.pyx
+++ b/pytouhou/ui/renderer.pyx
@@ -217,7 +217,7 @@ cdef class Renderer:
             glBindBuffer(GL_ARRAY_BUFFER, 0)
 
 
-    cdef void render_framebuffer(self, Framebuffer fb, Window window):
+    cdef void render_framebuffer(self, Framebuffer fb):
         cdef PassthroughVertex[4] buf
         cdef unsigned short indices[6]
         indices[:] = [0, 1, 2, 2, 3, 0]
@@ -225,7 +225,7 @@ cdef class Renderer:
         assert not self.use_fixed_pipeline
 
         glBindFramebuffer(GL_FRAMEBUFFER, 0)
-        glViewport(window.x, window.y, window.width, window.height)
+        glViewport(self.x, self.y, self.width, self.height)
         glBlendFunc(GL_ONE, GL_ZERO)
         glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)