UpdateOverlay function calls on unix platforms
This commit is contained in:
parent
853b318848
commit
00f080c046
1 changed files with 6 additions and 4 deletions
|
|
@ -337,11 +337,13 @@ void VulkanExampleBase::renderLoop()
|
||||||
if (fpsTimer > 1000.0f)
|
if (fpsTimer > 1000.0f)
|
||||||
{
|
{
|
||||||
lastFPS = frameCounter;
|
lastFPS = frameCounter;
|
||||||
updateTextOverlay();
|
|
||||||
fpsTimer = 0.0f;
|
fpsTimer = 0.0f;
|
||||||
frameCounter = 0;
|
frameCounter = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Cap UI overlay update rates/only issue when update requested
|
||||||
|
updateOverlay();
|
||||||
|
|
||||||
bool updateView = false;
|
bool updateView = false;
|
||||||
|
|
||||||
// Check touch state (for movement)
|
// Check touch state (for movement)
|
||||||
|
|
@ -425,10 +427,10 @@ void VulkanExampleBase::renderLoop()
|
||||||
if (fpsTimer > 1000.0f)
|
if (fpsTimer > 1000.0f)
|
||||||
{
|
{
|
||||||
lastFPS = frameCounter;
|
lastFPS = frameCounter;
|
||||||
updateTextOverlay();
|
|
||||||
fpsTimer = 0.0f;
|
fpsTimer = 0.0f;
|
||||||
frameCounter = 0;
|
frameCounter = 0;
|
||||||
}
|
}
|
||||||
|
updateOverlay();
|
||||||
}
|
}
|
||||||
#elif defined(VK_USE_PLATFORM_WAYLAND_KHR)
|
#elif defined(VK_USE_PLATFORM_WAYLAND_KHR)
|
||||||
while (!quit)
|
while (!quit)
|
||||||
|
|
@ -474,10 +476,10 @@ void VulkanExampleBase::renderLoop()
|
||||||
wl_shell_surface_set_title(shell_surface, windowTitle.c_str());
|
wl_shell_surface_set_title(shell_surface, windowTitle.c_str());
|
||||||
}
|
}
|
||||||
lastFPS = frameCounter;
|
lastFPS = frameCounter;
|
||||||
updateTextOverlay();
|
|
||||||
fpsTimer = 0.0f;
|
fpsTimer = 0.0f;
|
||||||
frameCounter = 0;
|
frameCounter = 0;
|
||||||
}
|
}
|
||||||
|
updateOverlay();
|
||||||
}
|
}
|
||||||
#elif defined(VK_USE_PLATFORM_XCB_KHR)
|
#elif defined(VK_USE_PLATFORM_XCB_KHR)
|
||||||
xcb_flush(connection);
|
xcb_flush(connection);
|
||||||
|
|
@ -525,10 +527,10 @@ void VulkanExampleBase::renderLoop()
|
||||||
windowTitle.size(), windowTitle.c_str());
|
windowTitle.size(), windowTitle.c_str());
|
||||||
}
|
}
|
||||||
lastFPS = frameCounter;
|
lastFPS = frameCounter;
|
||||||
updateTextOverlay();
|
|
||||||
fpsTimer = 0.0f;
|
fpsTimer = 0.0f;
|
||||||
frameCounter = 0;
|
frameCounter = 0;
|
||||||
}
|
}
|
||||||
|
updateOverlay();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
// Flush device to make sure all resources can be freed
|
// Flush device to make sure all resources can be freed
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue