diff --git a/implementations/Crafter.Graphics-Window_vulkan_windows.cpp b/implementations/Crafter.Graphics-Window_vulkan_windows.cpp index a0b97a8..24d868f 100644 --- a/implementations/Crafter.Graphics-Window_vulkan_windows.cpp +++ b/implementations/Crafter.Graphics-Window_vulkan_windows.cpp @@ -530,6 +530,9 @@ void WindowVulkan::SetTitle(const std::string_view title) { } +#ifdef CRAFTER_TIMING +std::chrono::time_point framEnd; +#endif void WindowVulkan::StartUpdate() { lastFrameBegin = std::chrono::high_resolution_clock::now(); @@ -545,6 +548,7 @@ void WindowVulkan::StartUpdate() { Render(); lastMousePos = currentMousePos; currentFrameTime = {start, start-lastFrameBegin}; + lastFrameBegin = start; } } diff --git a/project.json b/project.json index 3844b23..59e36b6 100644 --- a/project.json +++ b/project.json @@ -115,6 +115,14 @@ "target": "x86_64-w64-mingw32", "march": "x86-64" }, + { + "name": "lib-vulkan-windows-timing", + "extends": ["vulkan-windows", "deps-timing"], + "type": "library", + "target": "x86_64-w64-mingw32", + "march": "x86-64", + "defines": [{ "name": "CRAFTER_TIMING" }] + }, { "name": "lib-vulkan-timing", "extends": ["vulkan", "deps-timing"],