comparison pytouhou/ui/opengl/renderer.pxd @ 515:b3193b43a86c

Add an indirection layer for textures, to cope with drivers assigning them random names.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 06 Dec 2013 19:02:42 +0100
parents 5e3e0b09a531
children 75ae628522c9
comparison
equal deleted inserted replaced
514:3d4410de78e1 515:b3193b43a86c
12 int x, y 12 int x, y
13 float u, v 13 float u, v
14 14
15 15
16 cdef class Texture: 16 cdef class Texture:
17 cdef GLuint texture 17 cdef long key
18 cdef GLuint texture, *pointer
18 cdef unsigned short indices[2][65536] 19 cdef unsigned short indices[2][65536]
19 20
20 21
21 cdef class Renderer: 22 cdef class Renderer:
22 cdef TextureManager texture_manager 23 cdef TextureManager texture_manager
25 cdef Vertex vertex_buffer[MAX_ELEMENTS] 26 cdef Vertex vertex_buffer[MAX_ELEMENTS]
26 cdef long x, y, width, height 27 cdef long x, y, width, height
27 28
28 cdef bint use_fixed_pipeline #XXX 29 cdef bint use_fixed_pipeline #XXX
29 30
31 cdef GLuint textures[MAX_TEXTURES]
30 cdef unsigned short *indices[MAX_TEXTURES][2] 32 cdef unsigned short *indices[MAX_TEXTURES][2]
31 cdef unsigned short last_indices[2 * MAX_TEXTURES] 33 cdef unsigned short last_indices[2 * MAX_TEXTURES]
32 cdef PyObject *elements[640*3] 34 cdef PyObject *elements[640*3]
33 35
34 cdef void render_elements(self, elements) except * 36 cdef void render_elements(self, elements) except *