demosys.context.headless.Window¶
-
demosys.context.headless.
Window
¶ Headless window using a standalone
moderngl.Context
.
Methods¶
-
Window.
__init__
()¶ Creates a standalone
moderngl.Context
. The headless window currently have no event input from keyboard or mouse.Using this window require either
settings
values to be present:HEADLESS_FRAMES
: How many frames should be rendered before closing the windowHEADLESS_DURATION
: How many seconds rendering should last before the window closes
-
Window.
draw
(current_time, frame_time)¶ Calls the superclass
draw()
methods and checksHEADLESS_FRAMES
/HEADLESS_DURATION
-
Window.
use
()¶ Binds the framebuffer representing this window
-
Window.
should_close
() → bool¶ Checks if the internal close state is set
-
Window.
close
()¶ Sets the internal close state
-
Window.
resize
(width, height)¶ Resizing is not supported by the headless window. We simply override with an empty method.
-
Window.
swap_buffers
()¶ Headless window currently don’t support double buffering. We only increment the frame counter here.
-
Window.
terminate
()¶ No teardown is needed. We override with an empty method