diff pytouhou/ui/opengl/shader.pyx @ 523:6e3b3d5d4691

Make matrix a struct.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 18 Dec 2013 17:53:29 +0100
parents 5e3e0b09a531
children 0f2af7552462
line wrap: on
line diff
--- a/pytouhou/ui/opengl/shader.pyx
+++ b/pytouhou/ui/opengl/shader.pyx
@@ -135,8 +135,8 @@ cdef class Shader:
     # upload a uniform matrix
     # works with matrices stored as lists,
     # as well as euclid matrices
-    cdef void uniform_matrix(self, name, Matrix mat):
+    cdef void uniform_matrix(self, name, Matrix *mat):
         # obtain the uniform location
         loc = self.get_uniform_location(name)
         # uplaod the 4x4 floating point matrix
-        glUniformMatrix4fv(loc, 1, False, mat.data)
+        glUniformMatrix4fv(loc, 1, False, <GLfloat*>mat)