39 Window(uint32_t width, uint32_t height,
const std::string &title, GLFWmonitor *monitor =
nullptr,
40 GLFWwindow *share =
nullptr);
79 glm::uvec2 GetSize()
const;
87 void SetSize(
int width,
int height);
92 void ToggleFullscreen();
103 glm::ivec2 windowSize =
GetSize();
104 glfwGetCursorPos(
_window, &x, &y);
105 y = windowSize.y - y;
111 glfwSetWindowAttrib(
_window, GLFW_RESIZABLE, resizable ? GLFW_TRUE : GLFW_FALSE);
bool _isFullscreen
Definition Window.hpp:32
int _windowedWidth
Definition Window.hpp:35
GLFWwindow * _window
Definition Window.hpp:28
void MaskCursor()
Hide the cursor and lock it to the window.
Definition Window.hpp:117
GLFWwindow * GetGLFWWindow() const
Get a pointer to the GLFW window.
Definition Window.hpp:59
int _windowedX
Definition Window.hpp:33
bool ShouldClose() const
Check if the window should close.
Definition Window.hpp:52
bool IsCursorMasked() const
Check if the cursor is currently masked (hidden and locked).
Definition Window.hpp:127
int _windowedHeight
Definition Window.hpp:36
GLFWmonitor * _monitor
Definition Window.hpp:29
void ShowCursor()
Show the cursor and unlock it from the window.
Definition Window.hpp:122
GLFWwindow * _share
Definition Window.hpp:30
void Destroy()
Destroy the window.
Definition Window.cpp:14
glm::vec2 GetMousePosition()
Get the current mouse position.
Definition Window.hpp:99
std::string _title
Definition Window.hpp:27
void SetResizable(bool resizable)
Definition Window.hpp:109
int _windowedY
Definition Window.hpp:34
glm::uvec2 GetSize() const
Get the window size.
Definition Window.cpp:23
void SetTitle(std::string_view title)
Set the window title.
Definition Window.hpp:66
Definition OnResize.hpp:12