mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 11:31:49 +00:00
Window fullscreen toggle & saving size
This commit is contained in:
parent
7cb73998dd
commit
446edff4c4
5 changed files with 77 additions and 2 deletions
|
|
@ -11,11 +11,16 @@
|
|||
|
||||
class GLFWwindow;
|
||||
class ImageData;
|
||||
struct DisplaySettings;
|
||||
struct GLFWmonitor;
|
||||
|
||||
class Window {
|
||||
static GLFWwindow* window;
|
||||
static DisplaySettings* settings;
|
||||
static std::stack<glm::vec4> scissorStack;
|
||||
static glm::vec4 scissorArea;
|
||||
|
||||
static bool tryToMaximize(GLFWwindow* window, GLFWmonitor* monitor);
|
||||
public:
|
||||
static uint width;
|
||||
static uint height;
|
||||
|
|
@ -28,6 +33,8 @@ public:
|
|||
static void setShouldClose(bool flag);
|
||||
static void swapBuffers();
|
||||
static void swapInterval(int interval);
|
||||
static void toggleFullscreen();
|
||||
static bool isFullscreen();
|
||||
|
||||
static void pushScissor(glm::vec4 area);
|
||||
static void popScissor();
|
||||
|
|
@ -36,6 +43,7 @@ public:
|
|||
static void clear();
|
||||
static void setBgColor(glm::vec3 color);
|
||||
static double time();
|
||||
static DisplaySettings* getSettings();
|
||||
|
||||
static glm::vec2 size() {
|
||||
return glm::vec2(width, height);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue