Mercurial > touhou
annotate pytouhou/ui/opengl/framebuffer.pxd @ 604:aca9551ee8b4
Fix compiling issues with Cython 0.20 ; don't pretend to concat shader sources
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Tue, 11 Nov 2014 15:46:31 +0100 |
parents | 6c9d8a3d853f |
children | 1b31169dc344 |
rev | line source |
---|---|
586
4b0593da29d5
Simplify framebuffer rendering with glDrawArrays, and move it all to its own file.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
1 from pytouhou.lib.opengl cimport GLuint |
4b0593da29d5
Simplify framebuffer rendering with glDrawArrays, and move it all to its own file.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
2 |
4b0593da29d5
Simplify framebuffer rendering with glDrawArrays, and move it all to its own file.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
3 cdef struct PassthroughVertex: |
4b0593da29d5
Simplify framebuffer rendering with glDrawArrays, and move it all to its own file.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
4 short x, y |
4b0593da29d5
Simplify framebuffer rendering with glDrawArrays, and move it all to its own file.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
5 float u, v |
4b0593da29d5
Simplify framebuffer rendering with glDrawArrays, and move it all to its own file.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
6 |
4b0593da29d5
Simplify framebuffer rendering with glDrawArrays, and move it all to its own file.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
7 |
4b0593da29d5
Simplify framebuffer rendering with glDrawArrays, and move it all to its own file.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
8 cdef class Framebuffer: |
4b0593da29d5
Simplify framebuffer rendering with glDrawArrays, and move it all to its own file.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
9 cdef GLuint fbo, texture, rbo, vbo, vao |
4b0593da29d5
Simplify framebuffer rendering with glDrawArrays, and move it all to its own file.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
10 cdef PassthroughVertex[4] buf |
587
6c9d8a3d853f
Use ARB_framebuffer_blit instead of a second rendering pass for scaled rendering, if supported, and remove framebuffer stuff from the Renderer.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
586
diff
changeset
|
11 cdef int x, y, width, height |
586
4b0593da29d5
Simplify framebuffer rendering with glDrawArrays, and move it all to its own file.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
12 |
4b0593da29d5
Simplify framebuffer rendering with glDrawArrays, and move it all to its own file.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
13 cpdef bind(self) |
4b0593da29d5
Simplify framebuffer rendering with glDrawArrays, and move it all to its own file.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
14 cdef void set_state(self) nogil |
587
6c9d8a3d853f
Use ARB_framebuffer_blit instead of a second rendering pass for scaled rendering, if supported, and remove framebuffer stuff from the Renderer.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
586
diff
changeset
|
15 cdef void render(self, int x, int y, int width, int height) nogil |