comparison 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
comparison
equal deleted inserted replaced
411:2428296cccab 412:5fe6cd6ceb48
27 27
28 from pytouhou.game.sprite import Sprite 28 from pytouhou.game.sprite import Sprite
29 from pytouhou.vm.anmrunner import ANMRunner 29 from pytouhou.vm.anmrunner import ANMRunner
30 30
31 from pytouhou.utils.helpers import get_logger 31 from pytouhou.utils.helpers import get_logger
32 from pytouhou.utils.maths import perspective, setup_camera
32 33
33 from .renderer import Renderer 34 from .renderer import Renderer
34 from .shaders.eosd import GameShader 35 from .shaders.eosd import GameShader
35 36
36 from ctypes import c_uint 37 from ctypes import c_uint
75 glEnableClientState(GL_COLOR_ARRAY) 76 glEnableClientState(GL_COLOR_ARRAY)
76 glEnableClientState(GL_VERTEX_ARRAY) 77 glEnableClientState(GL_VERTEX_ARRAY)
77 glEnableClientState(GL_TEXTURE_COORD_ARRAY) 78 glEnableClientState(GL_TEXTURE_COORD_ARRAY)
78 79
79 # Switch to game projection 80 # Switch to game projection
80 proj = self.perspective(30, float(self.width) / float(self.height), 81 proj = perspective(30, float(self.width) / float(self.height),
81 101010101./2010101., 101010101./10101.) 82 101010101./2010101., 101010101./10101.)
82 view = self.setup_camera(0, 0, 1) 83 view = setup_camera(0, 0, 1)
83 84
84 if not self.use_fixed_pipeline: 85 if not self.use_fixed_pipeline:
85 shader = GameShader() 86 shader = GameShader()
86 87
87 vbo_array = (c_uint * 1)() 88 vbo_array = (c_uint * 1)()