add fps counter
This commit is contained in:
parent
94f5cf88d2
commit
eadc229d7d
1 changed files with 6 additions and 0 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue