full screen option
This commit is contained in:
parent
e4de59be6c
commit
6cb55bba47
2 changed files with 5 additions and 2 deletions
|
@ -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:
|
||||||
|
|
|
@ -256,7 +256,7 @@ class Renderer:
|
||||||
self.out_writer = self.start_writer() if self.config.render_file else None
|
self.out_writer = self.start_writer() if self.config.render_file else None
|
||||||
self.streaming_process = self.start_streaming() if self.config.render_url else None
|
self.streaming_process = self.start_streaming() if self.config.render_url else None
|
||||||
|
|
||||||
if self.config.render_window:
|
if self.config.render_window:
|
||||||
pass
|
pass
|
||||||
# cv2.namedWindow("frame", cv2.WND_PROP_FULLSCREEN)
|
# cv2.namedWindow("frame", cv2.WND_PROP_FULLSCREEN)
|
||||||
# cv2.setWindowProperty("frame",cv2.WND_PROP_FULLSCREEN,cv2.WINDOW_FULLSCREEN)
|
# cv2.setWindowProperty("frame",cv2.WND_PROP_FULLSCREEN,cv2.WINDOW_FULLSCREEN)
|
||||||
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue