diff pytouhou/ui/renderer.pxd @ 399:1c773544eaeb

Make the background use a single vbo and offsets, just like the 2D code.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Tue, 12 Feb 2013 19:19:31 +0100
parents 8d252cdb495f
children 5fe6cd6ceb48
line wrap: on
line diff
--- a/pytouhou/ui/renderer.pxd
+++ b/pytouhou/ui/renderer.pxd
@@ -4,12 +4,22 @@ cdef struct Vertex:
     unsigned char r, g, b, a
 
 
+cdef struct VertexFloat:
+    float x, y, z
+    float u, v
+    unsigned char r, g, b, a
+
+
 cdef class Renderer:
     cdef public texture_manager
     cdef Vertex *vertex_buffer
+    cdef object texture_key
+    cdef unsigned short blendfunc, nb_vertices
+    cdef VertexFloat *background_vertex_buffer
 
     cpdef render_elements(self, elements)
-    cpdef render_background(self, back)
+    cpdef render_background(self)
+    cpdef prerender_background(self, background)
     cpdef ortho_2d(self, left, right, bottom, top)
     cpdef look_at(self, eye, center, up)
     cpdef perspective(self, fovy, aspect, zNear, zFar)