diff pytouhou/ui/anmrenderer.py @ 412:5fe6cd6ceb48

Refactor the maths functions out of Renderer.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 12 Jun 2013 18:30:08 +0200
parents 402e96a0baeb
children b0b8825296d0
line wrap: on
line diff
--- a/pytouhou/ui/anmrenderer.py
+++ b/pytouhou/ui/anmrenderer.py
@@ -29,6 +29,7 @@ from pytouhou.game.sprite import Sprite
 from pytouhou.vm.anmrunner import ANMRunner
 
 from pytouhou.utils.helpers import get_logger
+from pytouhou.utils.maths import perspective, setup_camera
 
 from .renderer import Renderer
 from .shaders.eosd import GameShader
@@ -77,9 +78,9 @@ class ANMRenderer(pyglet.window.Window, 
             glEnableClientState(GL_TEXTURE_COORD_ARRAY)
 
         # Switch to game projection
-        proj = self.perspective(30, float(self.width) / float(self.height),
-                                101010101./2010101., 101010101./10101.)
-        view = self.setup_camera(0, 0, 1)
+        proj = perspective(30, float(self.width) / float(self.height),
+                           101010101./2010101., 101010101./10101.)
+        view = setup_camera(0, 0, 1)
 
         if not self.use_fixed_pipeline:
             shader = GameShader()