add fps counter

This commit is contained in:
ilusha 2025-06-18 23:46:36 +00:00
parent 94f5cf88d2
commit eadc229d7d

View file

@ -5,6 +5,8 @@
#include <iostream>
#include "Timing.hpp"
int runOffscreen() {
try {
VulkanOffscreen app;
@ -41,6 +43,8 @@ int runInteractive() {
renderer.create(app.getRenderInfo());
app.setRenderPass(renderer.getRenderPass());
tp::FpsCounter fpsCounter;
while (!glfwWindowShouldClose(app.getWindow())) {
app.pollEvents();
@ -50,6 +54,8 @@ int runInteractive() {
renderer.updateUniformBuffer({drawData.extent2D.width, drawData.extent2D.height});
app.endDrawFrame(drawData);
fpsCounter.update();
}
app.waitDevice();