diff pytouhou/ui/opengl/sprite.pxd @ 532:dacdcca59b66

Don’t put back the rendering data into a tuple, use a specialised struct inside Sprite to pass it to the renderer.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Thu, 19 Dec 2013 21:55:26 +0100
parents 3d4410de78e1
children 53fa73932e9a
line wrap: on
line diff
--- a/pytouhou/ui/opengl/sprite.pxd
+++ b/pytouhou/ui/opengl/sprite.pxd
@@ -1,3 +1,9 @@
 from pytouhou.game.sprite cimport Sprite
 
-cpdef tuple get_sprite_rendering_data(Sprite sprite)
+cdef struct RenderingData:
+    float pos[12], left, right, bottom, top
+    unsigned char color[4]
+    long key
+
+cdef RenderingData* get_sprite_rendering_data(Sprite sprite) nogil
+cdef void render_sprite(Sprite sprite) nogil