No fps display in window title if text overlay is enabled
This commit is contained in:
parent
d414849e23
commit
706b9497ce
1 changed files with 6 additions and 2 deletions
|
|
@ -54,7 +54,11 @@ std::string VulkanExampleBase::getWindowTitle()
|
||||||
{
|
{
|
||||||
std::string device(deviceProperties.deviceName);
|
std::string device(deviceProperties.deviceName);
|
||||||
std::string windowTitle;
|
std::string windowTitle;
|
||||||
windowTitle = title + " - " + device + " - " + std::to_string(frameCounter) + " fps";
|
windowTitle = title + " - " + device;
|
||||||
|
if (!enableTextOverlay)
|
||||||
|
{
|
||||||
|
windowTitle += " - " + std::to_string(frameCounter) + " fps";
|
||||||
|
}
|
||||||
return windowTitle;
|
return windowTitle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -406,9 +410,9 @@ void VulkanExampleBase::renderLoop()
|
||||||
fpsTimer += (float)tDiff;
|
fpsTimer += (float)tDiff;
|
||||||
if (fpsTimer > 1000.0f)
|
if (fpsTimer > 1000.0f)
|
||||||
{
|
{
|
||||||
std::string windowTitle = getWindowTitle();
|
|
||||||
if (!enableTextOverlay)
|
if (!enableTextOverlay)
|
||||||
{
|
{
|
||||||
|
std::string windowTitle = getWindowTitle();
|
||||||
SetWindowText(window, windowTitle.c_str());
|
SetWindowText(window, windowTitle.c_str());
|
||||||
}
|
}
|
||||||
lastFPS = frameCounter;
|
lastFPS = frameCounter;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue