demosys.context.pyglet.Window¶
-
demosys.context.pyglet.
Window
¶ Window based on pyglet.
Note that pylget is unable to make core 3.3+ contexts and will not work for certain drivers and enviroments such as on OS X.
-
demosys.context.pyglet.
Keys
¶ Namespace mapping pyglet specific key constants
Methods¶
-
Window.
__init__
()¶ Opens a window using pyglet, registers input callbacks and creates a moderngl context.
-
Window.
on_key_press
(symbol, modifiers)¶ Pyglet specific key press callback. Forwards and translates the events to
keyboard_event()
-
Window.
on_key_release
(symbol, modifiers)¶ Pyglet specific key release callback. Forwards and translates the events to
keyboard_event()
-
Window.
on_mouse_motion
(x, y, dx, dy)¶ Pyglet specific mouse motion callback. Forwards and traslates the event to
cursor_event()
-
Window.
on_resize
(width, height)¶ Pyglet specific callback for window resize events.
-
Window.
use
()¶ Render to this window
-
Window.
swap_buffers
()¶ Swap buffers, increment frame counter and pull events
-
Window.
should_close
() → bool¶ returns the
has_exit
state in the pyglet window
-
Window.
close
()¶ Sets the close state in the pyglet window
-
Window.
terminate
()¶ No cleanup is really needed. Empty method