view pytouhou/ui/opengl/background.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 b18f0bd30ad0
line wrap: on
line source

from pytouhou.lib.opengl cimport GLuint
from .renderer cimport Renderer

cdef struct Vertex:
    float x, y, z
    float u, v
    unsigned char r, g, b, a


cdef class BackgroundRenderer:
    cdef GLuint texture
    cdef unsigned short blendfunc, nb_vertices
    cdef Vertex *vertex_buffer
    cdef unsigned int use_fixed_pipeline, vbo
    cdef object background

    cdef void render_background(self) except *
    cdef void load(self, background, Renderer renderer) except *