diff pytouhou/ui/opengl/renderer.pxd @ 586:4b0593da29d5

Simplify framebuffer rendering with glDrawArrays, and move it all to its own file.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 08 Oct 2014 16:34:24 +0200
parents c759b97f4f81
children 6c9d8a3d853f
line wrap: on
line diff
--- a/pytouhou/ui/opengl/renderer.pxd
+++ b/pytouhou/ui/opengl/renderer.pxd
@@ -1,6 +1,7 @@
 from cpython cimport PyObject
 from pytouhou.lib.opengl cimport GLuint
 from .texture cimport TextureManager, FontManager
+from .framebuffer cimport Framebuffer
 
 cdef struct Vertex:
     short x, y, z, padding
@@ -8,11 +9,6 @@ cdef struct Vertex:
     unsigned char r, g, b, a
 
 
-cdef struct PassthroughVertex:
-    short x, y
-    float u, v
-
-
 cdef class Texture:
     cdef long key
     cdef GLuint texture
@@ -30,8 +26,8 @@ cdef class Renderer:
     cdef long x, y, width, height
 
     # For modern GL.
-    cdef GLuint vbo, framebuffer_vbo, framebuffer_ibo
-    cdef GLuint vao, framebuffer_vao
+    cdef GLuint vbo
+    cdef GLuint vao
 
     cdef GLuint textures[MAX_TEXTURES]
     cdef unsigned short *indices[MAX_TEXTURES][2]
@@ -41,13 +37,4 @@ cdef class Renderer:
     cdef void set_state(self) nogil
     cdef void render_elements(self, elements) except *
     cdef void render_quads(self, rects, colors, GLuint texture) except *
-
-    cdef void set_framebuffer_state(self) nogil
     cdef void render_framebuffer(self, Framebuffer fb) except *
-
-
-cdef class Framebuffer:
-    cdef GLuint fbo, texture, rbo
-    cdef int x, y, width, height
-
-    cpdef bind(self)