comparison pytouhou/ui/opengl/renderer.pyx @ 606:3c2f96f1d715

Fix compilation under Cython 0.22, by making the pyx and the pxd declarations’ except clause similar.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 26 Nov 2014 13:36:38 +0100
parents 974decb8df4f
children a6a191e371c7
comparison
equal deleted inserted replaced
605:d6ead6f0ba80 606:3c2f96f1d715
128 glEnableVertexAttribArray(2) 128 glEnableVertexAttribArray(2)
129 129
130 glBindBuffer(GL_ARRAY_BUFFER, 0) 130 glBindBuffer(GL_ARRAY_BUFFER, 0)
131 131
132 132
133 cdef void render_elements(self, elements): 133 cdef void render_elements(self, elements) except *:
134 cdef Element element 134 cdef Element element
135 135
136 nb_elements = find_objects(self, elements) 136 nb_elements = find_objects(self, elements)
137 if not nb_elements: 137 if not nb_elements:
138 return 138 return
224 224
225 if use_debug_group: 225 if use_debug_group:
226 glPopDebugGroup() 226 glPopDebugGroup()
227 227
228 228
229 cdef void render_quads(self, rects, colors, GLuint texture): 229 cdef void render_quads(self, rects, colors, GLuint texture) except *:
230 # There is nothing that batch more than two quads on the same texture, currently. 230 # There is nothing that batch more than two quads on the same texture, currently.
231 cdef Vertex buf[8] 231 cdef Vertex buf[8]
232 cdef unsigned short indices[12] 232 cdef unsigned short indices[12]
233 if use_primitive_restart: 233 if use_primitive_restart:
234 indices[:] = [0, 1, 2, 3, 0xffff, 4, 5, 6, 7, 0, 0, 0] 234 indices[:] = [0, 1, 2, 3, 0xffff, 4, 5, 6, 7, 0, 0, 0]