move some options from swap chain to engine configuration and fix not working VSync
This commit is contained in:
@@ -21,6 +21,9 @@ namespace OpenVulkano
|
||||
const char* FRAMEBUFFER_CLEAR_COLOR_STR = "FramebufferClearColor";
|
||||
const char* PREFER_FRAMEBUFFER_FORMAT_SRGB_STR = "PreferFramebufferFormatSRGB";
|
||||
const char* LAZY_RENDERING_STR = "LazyRendering";
|
||||
const char* VSYNC_STR = "VSync";
|
||||
const char* FPSCAP_STR = "FpsCap";
|
||||
const char* PREFERRED_IMAGE_COUNT_STR = "PreferredImageCount";
|
||||
}
|
||||
|
||||
EngineConfiguration::EngineConfiguration()
|
||||
@@ -56,6 +59,16 @@ namespace OpenVulkano
|
||||
{
|
||||
root[LAZY_RENDERING_STR] >> m_lazyRendering;
|
||||
}
|
||||
|
||||
if (root.has_child(VSYNC_STR)) { root[VSYNC_STR] >> m_vSync; }
|
||||
if (root.has_child(FPSCAP_STR) && root[FPSCAP_STR].val().is_integer())
|
||||
{
|
||||
root[FPSCAP_STR] >> m_fpsCap;
|
||||
}
|
||||
if (root.has_child(PREFERRED_IMAGE_COUNT_STR) && root[PREFERRED_IMAGE_COUNT_STR].val().is_integer())
|
||||
{
|
||||
root[PREFERRED_IMAGE_COUNT_STR] >> m_preferredImageCount;
|
||||
}
|
||||
}
|
||||
|
||||
EngineConfiguration* EngineConfiguration::GetEngineConfiguration()
|
||||
|
||||
Reference in New Issue
Block a user