mirror of
https://github.com/AxioDL/boo.git
synced 2025-12-16 00:17:06 +00:00
Add targetFrameTime option for Vulkan backend
This commit is contained in:
@@ -125,7 +125,7 @@ namespace boo {
|
||||
int ApplicationRun(IApplication::EPlatformType platform, IApplicationCallback& cb, std::string_view uniqueName,
|
||||
std::string_view friendlyName, std::string_view pname, const std::vector<std::string>& args,
|
||||
std::string_view gfxApi, uint32_t samples, uint32_t anisotropy, bool deepColor,
|
||||
bool singleInstance) {
|
||||
int64_t targetFrameTime, bool singleInstance) {
|
||||
std::string thrName = std::string(friendlyName) + " Main";
|
||||
logvisor::RegisterThreadName(thrName.c_str());
|
||||
if (APP)
|
||||
@@ -135,7 +135,7 @@ int ApplicationRun(IApplication::EPlatformType platform, IApplicationCallback& c
|
||||
singleInstance);
|
||||
else if (platform == IApplication::EPlatformType::Xlib || platform == IApplication::EPlatformType::Auto)
|
||||
APP = new ApplicationXlib(cb, uniqueName, friendlyName, pname, args, gfxApi, samples, anisotropy, deepColor,
|
||||
singleInstance);
|
||||
targetFrameTime, singleInstance);
|
||||
else
|
||||
return 1;
|
||||
int ret = APP->run();
|
||||
|
||||
@@ -202,7 +202,7 @@ class ApplicationXlib final : public IApplication {
|
||||
public:
|
||||
ApplicationXlib(IApplicationCallback& callback, std::string_view uniqueName, std::string_view friendlyName,
|
||||
std::string_view pname, const std::vector<std::string>& args, std::string_view gfxApi,
|
||||
uint32_t samples, uint32_t anisotropy, bool deepColor, bool singleInstance)
|
||||
uint32_t samples, uint32_t anisotropy, bool deepColor, int64_t targetFrameTime, bool singleInstance)
|
||||
: m_callback(callback)
|
||||
, m_uniqueName(uniqueName)
|
||||
, m_friendlyName(friendlyName)
|
||||
@@ -217,6 +217,7 @@ public:
|
||||
g_VulkanContext.m_sampleCountDepth = samples;
|
||||
g_VulkanContext.m_anisotropy = anisotropy;
|
||||
g_VulkanContext.m_deepColor = deepColor;
|
||||
g_VulkanContext.m_targetFrameTime = targetFrameTime;
|
||||
|
||||
/* Check for Vulkan presence and preference */
|
||||
bool tryVulkan = true;
|
||||
|
||||
Reference in New Issue
Block a user