Mercurial > touhou
comparison pytouhou/ui/opengl/sprite.pyx @ 601:016f6b937893
Make sample data build again.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 25 Oct 2014 18:57:10 +0200 |
parents | e15672733c93 |
children |
comparison
equal
deleted
inserted
replaced
600:2a748aa29c3f | 601:016f6b937893 |
---|---|
30 | 30 |
31 cdef RenderingData* get_sprite_rendering_data(Sprite sprite) nogil: | 31 cdef RenderingData* get_sprite_rendering_data(Sprite sprite) nogil: |
32 if sprite.changed: | 32 if sprite.changed: |
33 render_sprite(sprite) | 33 render_sprite(sprite) |
34 return <RenderingData*>sprite._rendering_data | 34 return <RenderingData*>sprite._rendering_data |
35 | |
36 | |
37 def get_sprite_vertices(Sprite sprite): | |
38 if sprite.changed: | |
39 render_sprite(sprite) | |
40 data = <RenderingData*>sprite._rendering_data | |
41 return [(data.pos[0], data.pos[1], data.pos[2]), | |
42 (data.pos[3], data.pos[4], data.pos[5]), | |
43 (data.pos[6], data.pos[7], data.pos[8]), | |
44 (data.pos[9], data.pos[10], data.pos[11])] | |
35 | 45 |
36 | 46 |
37 cdef void render_sprite(Sprite sprite) nogil: | 47 cdef void render_sprite(Sprite sprite) nogil: |
38 cdef Matrix vertmat | 48 cdef Matrix vertmat |
39 | 49 |