MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / configure

Method configure

src/Core/Time/FramerateManager.cpp:19–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17 }
18
19 void FramerateManager::configure(vili::node& config)
20 {
21 if (!config["framerateTarget"].is_null())
22 {
23 m_limitFramerate = true;
24 m_framerateTarget = config["framerateTarget"];
25 }
26 if (!config["vsync"].is_null())
27 {
28 m_vsyncEnabled = config["vsync"];
29 }
30 if (!config["syncUpdateToRender"].is_null())
31 {
32 m_syncUpdateRender = config["syncUpdateToRender"];
33 }
34 m_reqFramerateInterval = 1.0 / static_cast<double>(m_framerateTarget);
35 Debug::Log->info("Framerate parameters : {} FPS {}, V-sync {}, Update Lock {}",
36 m_framerateTarget, (m_limitFramerate) ? "capped" : "uncapped",
37 (m_vsyncEnabled) ? "enabled" : "disabled",
38 (m_syncUpdateRender) ? "enabled" : "disabled");
39
40 m_window.setVerticalSyncEnabled(m_vsyncEnabled);
41 }
42
43 void FramerateManager::update()
44 {

Callers

nothing calls this directly

Calls 3

infoMethod · 0.80
is_nullMethod · 0.45

Tested by

no test coverage detected