# HG changeset patch # User Emmanuel Gil Peyrot # Date 1343408260 -7200 # Node ID 6702bc0215dc8c188a26a31a1d5d7a6ef3ab9733 # Parent 74471afbac377ab08604511cd921303d2002da43 Replace GL_QUADS with GL_TRIANGLES, to be GLES compatible. diff --git a/pytouhou/ui/renderer.pyx b/pytouhou/ui/renderer.pyx --- a/pytouhou/ui/renderer.pyx +++ b/pytouhou/ui/renderer.pyx @@ -71,7 +71,7 @@ cdef class Renderer: # Add indices index = nb_vertices - rec.extend((index, index + 1, index + 2, index + 3)) + rec.extend((index, index + 1, index + 2, index + 2, index + 3, index)) nb_vertices += 4 @@ -84,7 +84,7 @@ cdef class Renderer: indices = pack(str(nb_indices) + 'H', *indices) glBlendFunc(GL_SRC_ALPHA, (GL_ONE_MINUS_SRC_ALPHA, GL_ONE)[blendfunc]) glBindTexture(GL_TEXTURE_2D, self.texture_manager[texture_key].id) - glDrawElements(GL_QUADS, nb_indices, GL_UNSIGNED_SHORT, indices) + glDrawElements(GL_TRIANGLES, nb_indices, GL_UNSIGNED_SHORT, indices) cpdef ortho_2d(self, left, right, bottom, top):