Mercurial > touhou
annotate pytouhou/ui/opengl/framebuffer.pxd @ 588:7a82c4b52b16
Prevent a traceback when we call Window.run without a runner set.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Wed, 08 Oct 2014 19:20:15 +0200 |
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 |