comparison 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
comparison
equal deleted inserted replaced
398:8d252cdb495f 399:1c773544eaeb
1 cdef struct Vertex: 1 cdef struct Vertex:
2 int x, y, z 2 int x, y, z
3 float u, v
4 unsigned char r, g, b, a
5
6
7 cdef struct VertexFloat:
8 float x, y, z
3 float u, v 9 float u, v
4 unsigned char r, g, b, a 10 unsigned char r, g, b, a
5 11
6 12
7 cdef class Renderer: 13 cdef class Renderer:
8 cdef public texture_manager 14 cdef public texture_manager
9 cdef Vertex *vertex_buffer 15 cdef Vertex *vertex_buffer
16 cdef object texture_key
17 cdef unsigned short blendfunc, nb_vertices
18 cdef VertexFloat *background_vertex_buffer
10 19
11 cpdef render_elements(self, elements) 20 cpdef render_elements(self, elements)
12 cpdef render_background(self, back) 21 cpdef render_background(self)
22 cpdef prerender_background(self, background)
13 cpdef ortho_2d(self, left, right, bottom, top) 23 cpdef ortho_2d(self, left, right, bottom, top)
14 cpdef look_at(self, eye, center, up) 24 cpdef look_at(self, eye, center, up)
15 cpdef perspective(self, fovy, aspect, zNear, zFar) 25 cpdef perspective(self, fovy, aspect, zNear, zFar)
16 cpdef setup_camera(self, dx, dy, dz) 26 cpdef setup_camera(self, dx, dy, dz)