Skip to content

Commit b2bc566

Browse files
committed
Merge pull request kivy#2352 from matham/python-temp
Fix cython shader 'python temp coercion' exception.
2 parents ccec759 + 827bd6c commit b2bc566

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

kivy/graphics/shader.pyx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,7 @@ cdef class Shader:
421421
cdef void bind_vertex_format(self, VertexFormat vertex_format):
422422
cdef unsigned int i
423423
cdef vertex_attr_t *attr
424+
cdef bytes name
424425

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

451453
# save for the next run.

0 commit comments

Comments
 (0)