Mercurial > touhou
comparison pytouhou/ui/opengl/framebuffer.pxd @ 610:1b31169dc344
Move the passthrough shader to the Framebuffer class, since it isn’t used in the use_framebuffer_blit path.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sun, 21 Dec 2014 18:52:18 +0100 |
parents | 6c9d8a3d853f |
children | a6af3ff86612 |
comparison
equal
deleted
inserted
replaced
609:23b9418e4b2f | 610:1b31169dc344 |
---|---|
1 from pytouhou.lib.opengl cimport GLuint | 1 from pytouhou.lib.opengl cimport GLuint |
2 from pytouhou.utils.matrix cimport Matrix | |
3 from .shader cimport Shader | |
2 | 4 |
3 cdef struct PassthroughVertex: | 5 cdef struct PassthroughVertex: |
4 short x, y | 6 short x, y |
5 float u, v | 7 float u, v |
6 | 8 |
7 | 9 |
8 cdef class Framebuffer: | 10 cdef class Framebuffer: |
9 cdef GLuint fbo, texture, rbo, vbo, vao | 11 cdef GLuint fbo, texture, rbo |
12 | |
13 # Used by the use_framebuffer_blit path | |
14 cdef int x, y, width, height | |
15 | |
16 # Used by the other one. | |
17 cdef GLuint vbo, vao | |
18 cdef Shader shader | |
19 cdef Matrix *mvp | |
10 cdef PassthroughVertex[4] buf | 20 cdef PassthroughVertex[4] buf |
11 cdef int x, y, width, height | |
12 | 21 |
13 cpdef bind(self) | 22 cpdef bind(self) |
14 cdef void set_state(self) nogil | 23 cdef void set_state(self) nogil |
15 cdef void render(self, int x, int y, int width, int height) nogil | 24 cdef void render(self, int x, int y, int width, int height) except * |