diff options
Diffstat (limited to 'src/GFX')
| -rw-r--r-- | src/GFX/Window.cpp | 4 | ||||
| -rw-r--r-- | src/GFX/Window.hpp | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/GFX/Window.cpp b/src/GFX/Window.cpp index 75e7613..7d0f5b3 100644 --- a/src/GFX/Window.cpp +++ b/src/GFX/Window.cpp @@ -58,6 +58,10 @@ void Window::on_size_change(void (callback)(GLFWwindow*, I32, I32)) const { glfwSetFramebufferSizeCallback(m_window, callback); } +void Window::framebuffer_size(I32& width, I32& height) const { + glfwGetFramebufferSize(m_window, &width, &height); +} + void Window::attach() const { glfwMakeContextCurrent(m_window); } diff --git a/src/GFX/Window.hpp b/src/GFX/Window.hpp index 86920b5..99824b1 100644 --- a/src/GFX/Window.hpp +++ b/src/GFX/Window.hpp @@ -15,6 +15,7 @@ public: PURE GLFWwindow* get() const; void on_size_change(void (* callback)(GLFWwindow*, I32, I32)) const; + void framebuffer_size(I32& width, I32& height) const; void attach() const; void detach() const; |
