annotate pytouhou/ui/window.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 3c2f96f1d715
children a6af3ff86612
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
458
1b56d62250ab Make pytouhou.ui.{window,shader,game{runner,renderer}} extension types.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
1 from pytouhou.lib cimport sdl
1b56d62250ab Make pytouhou.ui.{window,shader,game{runner,renderer}} extension types.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
2
1b56d62250ab Make pytouhou.ui.{window,shader,game{runner,renderer}} extension types.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
3
1b56d62250ab Make pytouhou.ui.{window,shader,game{runner,renderer}} extension types.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
4 cdef class Clock:
491
2276229282fd Fix gcc’s warnings with -Wall -Wextra.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 464
diff changeset
5 cdef unsigned long _ref_tick
2276229282fd Fix gcc’s warnings with -Wall -Wextra.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 464
diff changeset
6 cdef long _target_fps, _ref_frame, _fps_tick, _fps_frame
533
de778a80820a Optimise Clock a bit more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 512
diff changeset
7 cdef double fps
458
1b56d62250ab Make pytouhou.ui.{window,shader,game{runner,renderer}} extension types.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
8
1b56d62250ab Make pytouhou.ui.{window,shader,game{runner,renderer}} extension types.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
9 cdef void set_target_fps(self, long fps) nogil
1b56d62250ab Make pytouhou.ui.{window,shader,game{runner,renderer}} extension types.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
10 cdef void tick(self) nogil except *
1b56d62250ab Make pytouhou.ui.{window,shader,game{runner,renderer}} extension types.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
11
1b56d62250ab Make pytouhou.ui.{window,shader,game{runner,renderer}} extension types.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
12
463
11708a1d0a1a Make GameRunner inherit from a Runner base class, to bypass Python calls in Window.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 458
diff changeset
13 cdef class Runner:
11708a1d0a1a Make GameRunner inherit from a Runner base class, to bypass Python calls in Window.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 458
diff changeset
14 cdef long width, height
11708a1d0a1a Make GameRunner inherit from a Runner base class, to bypass Python calls in Window.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 458
diff changeset
15
11708a1d0a1a Make GameRunner inherit from a Runner base class, to bypass Python calls in Window.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 458
diff changeset
16 cdef void start(self) except *
11708a1d0a1a Make GameRunner inherit from a Runner base class, to bypass Python calls in Window.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 458
diff changeset
17 cdef void finish(self) except *
606
3c2f96f1d715 Fix compilation under Cython 0.22, by making the pyx and the pxd declarations’ except clause similar.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 596
diff changeset
18 cpdef bint update(self, bint render) except -1
463
11708a1d0a1a Make GameRunner inherit from a Runner base class, to bypass Python calls in Window.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 458
diff changeset
19
11708a1d0a1a Make GameRunner inherit from a Runner base class, to bypass Python calls in Window.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 458
diff changeset
20
458
1b56d62250ab Make pytouhou.ui.{window,shader,game{runner,renderer}} extension types.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
21 cdef class Window:
1b56d62250ab Make pytouhou.ui.{window,shader,game{runner,renderer}} extension types.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
22 cdef sdl.Window win
463
11708a1d0a1a Make GameRunner inherit from a Runner base class, to bypass Python calls in Window.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 458
diff changeset
23 cdef Runner runner
458
1b56d62250ab Make pytouhou.ui.{window,shader,game{runner,renderer}} extension types.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
24 cdef Clock clock
589
0768122da817 Add a frameskip option, and use swap interval to implement it.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 578
diff changeset
25 cdef int frame, frameskip
596
ab131d04987d Fix a regression introduced in the previous commit when the interface has a different resolution than 640×480 and framebuffer_blit is enabled.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 594
diff changeset
26 cdef int width, height
458
1b56d62250ab Make pytouhou.ui.{window,shader,game{runner,renderer}} extension types.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
27
1b56d62250ab Make pytouhou.ui.{window,shader,game{runner,renderer}} extension types.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
28 cdef void set_size(self, int width, int height) nogil
463
11708a1d0a1a Make GameRunner inherit from a Runner base class, to bypass Python calls in Window.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 458
diff changeset
29 cpdef set_runner(self, Runner runner=*)
458
1b56d62250ab Make pytouhou.ui.{window,shader,game{runner,renderer}} extension types.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
30 cpdef run(self)
606
3c2f96f1d715 Fix compilation under Cython 0.22, by making the pyx and the pxd declarations’ except clause similar.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 596
diff changeset
31 cdef bint run_frame(self) except -1
463
11708a1d0a1a Make GameRunner inherit from a Runner base class, to bypass Python calls in Window.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 458
diff changeset
32 cdef double get_fps(self) nogil