aboutsummaryrefslogtreecommitdiff
path: root/include/Vsync.hpp
blob: 387d2b529104cbed8ab5d9774fadc10821987899 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#pragma once

#include <SFML/Graphics/RenderWindow.hpp>

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;
    };
}