comparison pytouhou/ui/renderer.pxd @ 503:c622eaf64428

Optimize GameRunner some more, fix replay, and remove Window dependency in Renderer.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 04 Oct 2013 14:27:11 +0200
parents feecdb4a8928
children bfea9e9a6845
comparison
equal deleted inserted replaced
502:3d3285918ba1 503:c622eaf64428
1 from cpython cimport PyObject 1 from cpython cimport PyObject
2 from .window cimport Window
3 from pytouhou.lib.opengl cimport GLuint 2 from pytouhou.lib.opengl cimport GLuint
4 3
5 cdef struct Vertex: 4 cdef struct Vertex:
6 int x, y, z 5 int x, y, z
7 float u, v 6 float u, v
15 14
16 cdef class Renderer: 15 cdef class Renderer:
17 cdef public texture_manager, font_manager 16 cdef public texture_manager, font_manager
18 cdef GLuint vbo, framebuffer_vbo 17 cdef GLuint vbo, framebuffer_vbo
19 cdef Vertex *vertex_buffer 18 cdef Vertex *vertex_buffer
19 cdef long x, y, width, height
20 20
21 cdef bint use_fixed_pipeline #XXX 21 cdef bint use_fixed_pipeline #XXX
22 22
23 cdef unsigned short *indices[2][MAX_TEXTURES] 23 cdef unsigned short *indices[2][MAX_TEXTURES]
24 cdef unsigned short last_indices[2 * MAX_TEXTURES] 24 cdef unsigned short last_indices[2 * MAX_TEXTURES]
25 cdef PyObject *elements[640*3] 25 cdef PyObject *elements[640*3]
26 26
27 cdef void render_elements(self, elements) except * 27 cdef void render_elements(self, elements) except *
28 cdef void render_quads(self, rects, colors, texture) except * 28 cdef void render_quads(self, rects, colors, texture) except *
29 cdef void render_framebuffer(self, Framebuffer fb, Window window) except * 29 cdef void render_framebuffer(self, Framebuffer fb) except *
30 30
31 31
32 cdef class Framebuffer: 32 cdef class Framebuffer:
33 cdef GLuint fbo, texture, rbo 33 cdef GLuint fbo, texture, rbo
34 cdef int x, y, width, height 34 cdef int x, y, width, height