diff pytouhou/ui/opengl/background.pxd @ 519:b18f0bd30ad0

Optimise background rendering.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sat, 07 Dec 2013 22:16:38 +0100
parents b3193b43a86c
children 94725968dabb
line wrap: on
line diff
--- a/pytouhou/ui/opengl/background.pxd
+++ b/pytouhou/ui/opengl/background.pxd
@@ -1,4 +1,4 @@
-from pytouhou.lib.opengl cimport GLuint
+from pytouhou.lib.opengl cimport GLuint, GLushort, GLsizei
 from .renderer cimport Renderer
 
 cdef struct Vertex:
@@ -9,10 +9,15 @@ cdef struct Vertex:
 
 cdef class BackgroundRenderer:
     cdef GLuint texture
-    cdef unsigned short blendfunc, nb_vertices
+    cdef GLsizei nb_indices
+    cdef unsigned int use_fixed_pipeline
+
+    # For modern GL.
+    cdef GLuint vbo, ibo
+
+    # For fixed pipeline.
     cdef Vertex *vertex_buffer
-    cdef unsigned int use_fixed_pipeline, vbo
-    cdef object background
+    cdef GLushort *indices
 
     cdef void render_background(self) except *
     cdef void load(self, background, Renderer renderer) except *