LibraryViewer

This commit is contained in:
IlyaShurupov 2023-11-28 23:22:04 +03:00 committed by Ilya Shurupov
parent f6ba86aff8
commit dd71eba0ec
24 changed files with 226111 additions and 36 deletions

View file

@ -1,5 +1,6 @@
#include "Window.hpp"
#include "Timing.hpp"
#include "imgui.h"
@ -11,6 +12,10 @@ int main() {
return 1;
}
int frames = 0;
int fps = 0;
tp::Timer timer(1000);
{
auto window = tp::Window::createWindow(800, 600, "Window 1");
@ -18,9 +23,17 @@ int main() {
while (!window->shouldClose()) {
window->processEvents();
ImGui::Text("Hello!");
ImGui::Text("fps: %i", fps);
window->draw();
if (timer.isTimeout()) {
fps = frames;
frames = 0;
timer.reset();
}
frames++;
}
}