mirror of https://github.com/kivy/kivy.git
Fix cython 'python temp coercion' exception.
This commit is contained in:
parent
24a06ffb20
commit
827bd6c7b7
|
@ -421,6 +421,7 @@ cdef class Shader:
|
||||||
cdef void bind_vertex_format(self, VertexFormat vertex_format):
|
cdef void bind_vertex_format(self, VertexFormat vertex_format):
|
||||||
cdef unsigned int i
|
cdef unsigned int i
|
||||||
cdef vertex_attr_t *attr
|
cdef vertex_attr_t *attr
|
||||||
|
cdef bytes name
|
||||||
|
|
||||||
# if the current vertex format used in the shader is the current one, do
|
# if the current vertex format used in the shader is the current one, do
|
||||||
# nothing.
|
# nothing.
|
||||||
|
@ -445,7 +446,8 @@ cdef class Shader:
|
||||||
attr = &vertex_format.vattr[i]
|
attr = &vertex_format.vattr[i]
|
||||||
if attr.per_vertex == 0:
|
if attr.per_vertex == 0:
|
||||||
continue
|
continue
|
||||||
attr.index = glGetAttribLocation(self.program, <char *><bytes>attr.name)
|
name = <bytes>attr.name
|
||||||
|
attr.index = glGetAttribLocation(self.program, <char *>name)
|
||||||
glEnableVertexAttribArray(attr.index)
|
glEnableVertexAttribArray(attr.index)
|
||||||
|
|
||||||
# save for the next run.
|
# save for the next run.
|
||||||
|
|
Loading…
Reference in New Issue