Correctly disable vsync if requested

This commit is contained in:
Alexander Bock
2022-02-23 13:40:40 +01:00
parent 7cb38b6c9c
commit 3f6fccb373

View File

@@ -53,7 +53,7 @@ function sgct.config.single(arg) end
-- shared: Determines whether the contents of the window should be shared using the SPOUT library [example: shared=true] {default: false}
-- Expert settings:
-- vsync: Whether the rendering speed is locked to the refreshrate [example: vsync=true] {default: false}
-- vsync: Whether the rendering speed is locked to the refreshrate [example: vsync=true] {default: true}
-- refreshRate: If vsync is enabled, this is the target framerate [example: refreshRate=30] {default: infinity}
-- stereo: Select the stereo rendering mode as supported by SGCT [example: stereo='anaglyph_red_cyan'] {default: 'none'}
-- msaa: The multisampling anti-aliasing factor [example: msaa=8] {default: 4}
@@ -279,11 +279,9 @@ function generateCluster(arg, viewport)
table.insert(result, [[ "debug": ]] .. tostring(arg["sgctdebug"]) .. [[,]])
end
if (arg["settings"]) then
table.insert(result, [[ "settings": {]])
generateSettings(result, arg["refreshRate"], arg["vsync"])
table.insert(result, [[ },]])
end
table.insert(result, [[ "settings": {]])
generateSettings(result, arg["refreshRate"], arg["vsync"])
table.insert(result, [[ },]])
if arg["scene"] then
table.insert(result, [[ "scene": {]])