diff pytouhou/ui/gamerenderer.pyx @ 464:36bc577b2392

Make the window resizable, and scale its content correctly.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 11 Sep 2013 15:55:19 +0200
parents a71b912b45b7
children feecdb4a8928
line wrap: on
line diff
--- a/pytouhou/ui/gamerenderer.pyx
+++ b/pytouhou/ui/gamerenderer.pyx
@@ -60,7 +60,7 @@ cdef class GameRenderer(Renderer):
         self.interface_mvp = ortho_2d(0., float(game.interface.width), float(game.interface.height), 0.)
 
 
-    cdef void render(self, game):
+    cdef void render(self, game, window):
         if not self.use_fixed_pipeline:
             self.framebuffer.bind()
 
@@ -71,7 +71,7 @@ cdef class GameRenderer(Renderer):
         if not self.use_fixed_pipeline:
             self.passthrough_shader.bind()
             self.passthrough_shader.uniform_matrix('mvp', self.interface_mvp)
-            self.render_framebuffer(self.framebuffer)
+            self.render_framebuffer(self.framebuffer, window)
 
 
     cdef void render_game(self, game):