diff pytouhou/ui/renderer.pxd @ 222:5cac48b328ad

Refactor rendering code a bit. Move duplicated camera setup code to a new “setup_camera” method, and move common methods to a new “Renderer” module in order to make individual sprite rendering easier.
author Thibaut Girka <thib@sitedethib.com>
date Sun, 18 Dec 2011 20:47:48 +0100
parents
children 74471afbac37
line wrap: on
line diff
new file mode 100644
--- /dev/null
+++ b/pytouhou/ui/renderer.pxd
@@ -0,0 +1,12 @@
+cdef struct Vertex:
+    int x, y, z
+    float u, v
+    unsigned char r, g, b, a
+
+
+cdef class Renderer:
+    cdef public texture_manager
+    cdef Vertex *vertex_buffer
+
+    cpdef render_elements(self, elements)
+    cpdef setup_camera(self, dx, dy, dz)