diff pytouhou/ui/renderer.pxd @ 449:d56536ef28e8

Improve render_elements’ speed a lot, and fix it in some corner cases. Thanks liori!
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sat, 03 Aug 2013 15:49:11 +0200
parents d8630c086926
children cae1ae9de430
line wrap: on
line diff
--- a/pytouhou/ui/renderer.pxd
+++ b/pytouhou/ui/renderer.pxd
@@ -1,3 +1,5 @@
+from cpython cimport PyObject
+
 cdef struct Vertex:
     int x, y, z
     float u, v
@@ -9,4 +11,8 @@ cdef class Renderer:
     cdef unsigned int vbo
     cdef Vertex *vertex_buffer
 
+    cdef unsigned short *indices[2][MAX_TEXTURES]
+    cdef unsigned short last_indices[2 * MAX_TEXTURES]
+    cdef PyObject *elements[640*3]
+
     cpdef render_elements(self, elements)