diff pytouhou/ui/gamerunner.pyx @ 435:878273a984c4

Improve Matrix representation, using float[16] instead of imbricated python lists.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 07 Aug 2013 11:34:40 +0200
parents f41a26971a19
children 43a8fed9a8d8
line wrap: on
line diff
--- a/pytouhou/ui/gamerunner.pyx
+++ b/pytouhou/ui/gamerunner.pyx
@@ -21,7 +21,7 @@ from pytouhou.lib.opengl cimport \
 
 from pytouhou.utils.helpers import get_logger
 from pytouhou.utils.maths cimport perspective, setup_camera, ortho_2d
-from pytouhou.utils.matrix cimport matrix_to_floats
+from pytouhou.utils.matrix cimport Matrix
 
 from .gamerenderer import GameRenderer
 from .background import BackgroundRenderer
@@ -182,7 +182,7 @@ class GameRunner(GameRenderer):
 
         if self.use_fixed_pipeline:
             glMatrixMode(GL_MODELVIEW)
-            glLoadMatrixf(matrix_to_floats(self.interface_mvp))
+            glLoadMatrixf((<Matrix>self.interface_mvp).data)
             glDisable(GL_FOG)
         else:
             self.interface_shader.bind()