view pytouhou/ui/opengl/framebuffer.pxd @ 609:23b9418e4b2f

Remove generic usage of GL_DRAW_FRAMEBUFFER which was introduced in GL 3.0 with framebuffer_blit.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sun, 21 Dec 2014 18:10:23 +0100
parents 6c9d8a3d853f
children 1b31169dc344
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
    cdef int x, y, width, height

    cpdef bind(self)
    cdef void set_state(self) nogil
    cdef void render(self, int x, int y, int width, int height) nogil