From af01062b0a207c106a6ebb599993fb72a43484c5 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 14 Sep 2020 04:45:54 +0200 Subject: Use manual vsync since nouveau drivers are broken --- include/Vsync.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 include/Vsync.hpp (limited to 'include/Vsync.hpp') diff --git a/include/Vsync.hpp b/include/Vsync.hpp new file mode 100644 index 0000000..387d2b5 --- /dev/null +++ b/include/Vsync.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include + +namespace QuickMedia { + class VSync { + public: + VSync(int framerate); + void display(sf::RenderWindow &window); + private: + sf::Int64 target_frame_delta_micro; + sf::Int64 overflow; + sf::Clock timer; + }; +} \ No newline at end of file -- cgit v1.2.3