view pytouhou/ui/opengl/framebuffer.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
children 6c9d8a3d853f
line wrap: on
line source

from pytouhou.lib.opengl cimport GLuint

cdef struct PassthroughVertex:
    short x, y
    float u, v


cdef class Framebuffer:
    cdef GLuint fbo, texture, rbo, vbo, vao
    cdef PassthroughVertex[4] buf

    cpdef bind(self)
    cdef void set_state(self) nogil
    cdef void render(self) nogil