Mercurial > touhou
comparison 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 |
comparison
equal
deleted
inserted
replaced
522:e8496e5ba056 | 523:6e3b3d5d4691 |
---|---|
133 glUniform4fv(self.get_uniform_location(name), 1, vals) | 133 glUniform4fv(self.get_uniform_location(name), 1, vals) |
134 | 134 |
135 # upload a uniform matrix | 135 # upload a uniform matrix |
136 # works with matrices stored as lists, | 136 # works with matrices stored as lists, |
137 # as well as euclid matrices | 137 # as well as euclid matrices |
138 cdef void uniform_matrix(self, name, Matrix mat): | 138 cdef void uniform_matrix(self, name, Matrix *mat): |
139 # obtain the uniform location | 139 # obtain the uniform location |
140 loc = self.get_uniform_location(name) | 140 loc = self.get_uniform_location(name) |
141 # uplaod the 4x4 floating point matrix | 141 # uplaod the 4x4 floating point matrix |
142 glUniformMatrix4fv(loc, 1, False, mat.data) | 142 glUniformMatrix4fv(loc, 1, False, <GLfloat*>mat) |