Skip to content

Commit

Permalink
Fix cython 'python temp coercion' exception.
Browse files Browse the repository at this point in the history
  • Loading branch information
matham committed Jul 17, 2014
1 parent 24a06ff commit 827bd6c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kivy/graphics/shader.pyx
Expand Up @@ -421,6 +421,7 @@ cdef class Shader:
cdef void bind_vertex_format(self, VertexFormat vertex_format):
cdef unsigned int i
cdef vertex_attr_t *attr
cdef bytes name

# if the current vertex format used in the shader is the current one, do
# nothing.
Expand All @@ -445,7 +446,8 @@ cdef class Shader:
attr = &vertex_format.vattr[i]
if attr.per_vertex == 0:
continue
attr.index = glGetAttribLocation(self.program, <char *><bytes>attr.name)
name = <bytes>attr.name
attr.index = glGetAttribLocation(self.program, <char *>name)
glEnableVertexAttribArray(attr.index)

# save for the next run.
Expand Down

0 comments on commit 827bd6c

Please sign in to comment.