11 mFramebufferResized(false)
18 glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
19 glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE);
23 const GLFWvidmode* mode = glfwGetVideoMode(glfwGetPrimaryMonitor());
24 mFullScreenRes.
width = mode->width;
25 mFullScreenRes.
height = mode->height;
26 mWindow = glfwCreateWindow(mode->width,
29 glfwGetPrimaryMonitor(),
nullptr);
39 glfwSetWindowUserPointer(mWindow,
this);
50 return glfwWindowShouldClose(mWindow);
55 return static_cast<void*
>(mWindow);
60 glfwDestroyWindow(mWindow);
72 app->mFramebufferResized =
true;
77 return mFullScreenRes;
Defines a generic application interface for rendering-based programs.
virtual ScreenSettings GetScreenSettings() const =0
Retrieves the current screen or window settings.
Desktop implementation of the IWindowSystem interface using GLFW.
bool ShouldClose() const override
Checks whether the user has requested to close the window.
StandaloneDesktopWindow(IApplication &app)
Constructs a desktop window system instance.
void CreateAppWindow(unsigned int width, unsigned int height, const std::string &title) override
Creates the main application window.
const IApplication & GetApplication() override
Retrieves a reference to the owning application instance.
void PollEvents() override
Polls and processes OS-level window events (input, resize, close, etc.).
WindowResolution GetFullScreenResolution() const override
Queries the resolution of the full-screen display mode.
void Shutdown() override
Performs cleanup and releases window-related resources.
static void FramebufferResizeCallback(GLFWwindow *window, int width, int height)
GLFW framebuffer resize callback.
void * GetNativeHandle() const override
Returns a pointer to the underlying native window handle.
std::string name
The window or application name.
unsigned int width
Screen or window width in pixels.
unsigned int height
Screen or window height in pixels.
bool isFullScreen
Whether the application runs in fullscreen mode.
Represents the pixel resolution of a window or display.
unsigned int height
Window or screen height in pixels.
unsigned int width
Window or screen width in pixels.