full screen option

This commit is contained in:
Ruben van de Ven 2024-09-30 14:59:03 +02:00
parent e4de59be6c
commit 6cb55bba47
2 changed files with 5 additions and 2 deletions

View file

@ -255,6 +255,9 @@ render_parser.add_argument("--render-file",
render_parser.add_argument("--render-window", render_parser.add_argument("--render-window",
help="Render a previewing to a window", help="Render a previewing to a window",
action='store_true') action='store_true')
render_parser.add_argument("--full-screen",
help="Set Window full screen",
action='store_true')
render_parser.add_argument("--render-url", render_parser.add_argument("--render-url",
help="""Stream renderer on given URL. Two easy approaches: help="""Stream renderer on given URL. Two easy approaches:

View file

@ -265,7 +265,7 @@ class Renderer:
config = pyglet.gl.Config(sample_buffers=1, samples=4) config = pyglet.gl.Config(sample_buffers=1, samples=4)
# , fullscreen=self.config.render_window # , fullscreen=self.config.render_window
self.window = pyglet.window.Window(width=self.frame_size[0], height=self.frame_size[1], config=config) self.window = pyglet.window.Window(width=self.frame_size[0], height=self.frame_size[1], config=config, fullscreen=self.config.full_screen)
self.window.set_handler('on_draw', self.on_draw) self.window.set_handler('on_draw', self.on_draw)
self.window.set_handler('on_refresh', self.on_refresh) self.window.set_handler('on_refresh', self.on_refresh)
self.window.set_handler('on_close', self.on_close) self.window.set_handler('on_close', self.on_close)