From 62eca12e25cbccf464a52f7d3328f75592a518f9 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 9 Apr 2018 14:33:02 -0400 Subject: [PATCH] Enable 'tracked' viewports on default --- openspace.cfg | 8 ++++---- scripts/configuration_helper.lua | 9 +++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/openspace.cfg b/openspace.cfg index 160919cb3a..c50197e970 100644 --- a/openspace.cfg +++ b/openspace.cfg @@ -7,13 +7,13 @@ return { -- occurs in a single window, a fisheye projection, or a dome cluster system -- A regular 1280x720 window - SGCTConfig = sgct.config.single{tracked=true}, + SGCTConfig = sgct.config.single{}, -- A regular 1920x1080 window - -- SGCTConfig = sgct.config.single{1920, 1080, tracked=true}, + -- SGCTConfig = sgct.config.single{1920, 1080}, -- A windowed 1920x1080 fullscreen - -- SGCTConfig = sgct.config.single{1920, 1080, border=false, windowPos={0,0}, shared=true, name="WV_OBS_SPOUT1", tracked=true}, + -- SGCTConfig = sgct.config.single{1920, 1080, border=false, windowPos={0,0}, shared=true, name="WV_OBS_SPOUT1"}, -- A 1k fisheye rendering -- SGCTConfig = sgct.config.fisheye{1024, 1024}, @@ -22,7 +22,7 @@ return { -- SGCTConfig = sgct.config.fisheye{1024, 1024, res={4096, 4096}, quality="2k", tilt=27}, -- Streaming OpenSpace via Spout to OBS - -- SGCTConfig = sgct.config.single{2560, 1440, shared=true, name="WV_OBS_SPOUT1", tracked=true}, + -- SGCTConfig = sgct.config.single{2560, 1440, shared=true, name="WV_OBS_SPOUT1"}, -- SGCTConfig = "${CONFIG}/spout_output.xml", diff --git a/scripts/configuration_helper.lua b/scripts/configuration_helper.lua index 2b6bc60440..9002ef9222 100644 --- a/scripts/configuration_helper.lua +++ b/scripts/configuration_helper.lua @@ -39,7 +39,8 @@ function sgct.makeConfig(config) end -- [example: scene = {offset = {x = 1.0, y = 1.0, z = 2.0}, orientation = { yaw = 120, pitch = 15, roll = 0.0 }, scale = 10.0}] -- capture: Settings to configure the image capture [example: capture = { path = "./images"] -- sgctDebug: Determines whether a higher debug level in SGCT is enabled [example: sgctDebug=true] {default: false} --- fov: The field of view settings [example: fov={ left=20, right=30, up=10, down=50}] {default: { left=30.0, right=30.0, up=16.875, down=16.875}} +-- fov: The field of view settings [example: fov={ left=20, right=30, up=10, down=50}] {default: { left=40.0, right=40.0, up=22.5, down=22.5}} +-- tracked: Determines whether the aspect ratio of the camera defined at application startup should persist when the window is resized [example: tracked=false] {default: true} -- Thus this function can be called the following ways: -- sgct.config.single() -> Leading to a 1280x720 resolution window @@ -684,9 +685,9 @@ function sgct.config.single(arg) type(arg["tracked"]) == "boolean" or type(arg["tracked"]) == "nil", "tracked must be a boolean or nil" ) - if (arg["tracked"] ~= nil and arg["tracked"] == true) then - trackedSpecifier = "tracked=\"true\"" - else + trackedSpecifier = "tracked=\"true\"" + + if (arg["tracked"] ~= nil and arg["tracked"] == false) then trackedSpecifier = "tracked=\"false\"" end