4#include "../io-management/ioHandler.h"
25 Window(
int width,
int height,
const char* title,
bool fullscreen =
false);
104 static int numWindows;
125 glfwGetWindowSize(window, &width,
nullptr);
131 glfwGetWindowSize(window,
nullptr, &height);
136 glfwGetFramebufferSize(window, &width, &height);
143 return float(width) / float(height);
151 return glfwGetWindowAttrib(window, GLFW_ICONIFIED);
155 return glfwWindowShouldClose(window);
159 glfwMakeContextCurrent(window);
163 glfwSetWindowShouldClose(window, GLFW_TRUE);
A class that handles I/O events.
Definition ioHandler.h:7
int getWidth() const
Definition window.h:123
bool isFullscreen() const
Definition window.h:146
bool shouldClose() const
Definition window.h:154
~Window()
Destroy the window. If this is the last window, terminate GLFW.
Definition window.cpp:185
GLFWwindow * getInternalPtr()
Definition window.h:111
bool toggleFullscreen()
Definition window.cpp:148
bool isMinimized() const
Definition window.h:150
Window(int width, int height, const char *title, bool fullscreen=false)
Definition window.cpp:42
IOHandler * getIOHandler() const
Definition window.h:119
void update()
Perform buffer swap and poll for I/O events.
Definition window.cpp:174
float getAspectRatio() const
Definition window.h:139
void setAsCurrentRenderWindow()
Definition window.h:158
void getFramebufferSize(int &width, int &height) const
Definition window.h:135
void close()
Close the window.
Definition window.h:162
void attachIOHandler(IOHandler &handler)
Definition window.cpp:167
const char * getTitle() const
Definition window.h:115
int getHeight() const
Definition window.h:129