diff 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
line wrap: on
line diff
--- a/pytouhou/ui/opengl/renderer.pxd
+++ b/pytouhou/ui/opengl/renderer.pxd
@@ -14,7 +14,8 @@ cdef struct PassthroughVertex:
 
 
 cdef class Texture:
-    cdef GLuint texture
+    cdef long key
+    cdef GLuint texture, *pointer
     cdef unsigned short indices[2][65536]
 
 
@@ -27,6 +28,7 @@ cdef class Renderer:
 
     cdef bint use_fixed_pipeline #XXX
 
+    cdef GLuint textures[MAX_TEXTURES]
     cdef unsigned short *indices[MAX_TEXTURES][2]
     cdef unsigned short last_indices[2 * MAX_TEXTURES]
     cdef PyObject *elements[640*3]