Mercurial > touhou
diff pytouhou/ui/renderer.pxd @ 505:bfea9e9a6845
Manage the texture-specific indices in the Texture, and some more renderer optimisations.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Fri, 01 Nov 2013 14:45:53 +0100 |
parents | c622eaf64428 |
children |
line wrap: on
line diff
--- a/pytouhou/ui/renderer.pxd +++ b/pytouhou/ui/renderer.pxd @@ -1,5 +1,6 @@ from cpython cimport PyObject from pytouhou.lib.opengl cimport GLuint +from .texture cimport TextureManager, FontManager cdef struct Vertex: int x, y, z @@ -12,20 +13,26 @@ cdef struct PassthroughVertex: float u, v +cdef class Texture: + cdef GLuint texture + cdef unsigned short indices[2][65536] + + cdef class Renderer: - cdef public texture_manager, font_manager + cdef TextureManager texture_manager + cdef FontManager font_manager cdef GLuint vbo, framebuffer_vbo - cdef Vertex *vertex_buffer + cdef Vertex vertex_buffer[MAX_ELEMENTS] cdef long x, y, width, height cdef bint use_fixed_pipeline #XXX - cdef unsigned short *indices[2][MAX_TEXTURES] + cdef unsigned short *indices[MAX_TEXTURES][2] cdef unsigned short last_indices[2 * MAX_TEXTURES] cdef PyObject *elements[640*3] cdef void render_elements(self, elements) except * - cdef void render_quads(self, rects, colors, texture) except * + cdef void render_quads(self, rects, colors, GLuint texture) except * cdef void render_framebuffer(self, Framebuffer fb) except *