diff pytouhou/ui/shader.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 f4d76d3d6f2a
children 1b56d62250ab
line wrap: on
line diff
--- a/pytouhou/ui/shader.pyx
+++ b/pytouhou/ui/shader.pyx
@@ -19,7 +19,7 @@ from pytouhou.lib.opengl cimport \
           GLuint, GLchar, GLfloat, GLenum)
 
 from libc.stdlib cimport malloc, free
-from pytouhou.utils.matrix cimport Matrix, matrix_to_floats
+from pytouhou.utils.matrix cimport Matrix
 
 
 class GLSLException(Exception):
@@ -145,4 +145,4 @@ cdef class Shader:
         # obtain the uniform location
         loc = self.get_uniform_location(name)
         # uplaod the 4x4 floating point matrix
-        glUniformMatrix4fv(loc, 1, False, matrix_to_floats(mat))
+        glUniformMatrix4fv(loc, 1, False, mat.data)