add framerate control (WIP)

This commit is contained in:
MihailRis
2024-07-25 22:33:21 +03:00
parent 664faf35e9
commit a856b4f140
6 changed files with 29 additions and 8 deletions
+3 -1
View File
@@ -19,6 +19,8 @@ class Window {
static std::stack<glm::vec4> scissorStack;
static glm::vec4 scissorArea;
static bool fullscreen;
static int framerate;
static double prevSwap;
static bool tryToMaximize(GLFWwindow* window, GLFWmonitor* monitor);
public:
@@ -34,7 +36,7 @@ public:
static bool isShouldClose();
static void setShouldClose(bool flag);
static void swapBuffers();
static void swapInterval(int interval);
static void setFramerate(int interval);
static void toggleFullscreen();
static bool isFullscreen();
static bool isMaximized();