Class GlfwWindow¶
Defined in File glfw_window.h
Inheritance Relationships¶
Base Type¶
public portal::Window(Class Window)
Class Documentation¶
-
class GlfwWindow : public portal::Window¶
Public Functions
-
GlfwWindow(ProjectSettings &settings, const WindowProperties &properties, const CallbackConsumers &consumers)¶
-
~GlfwWindow() override¶
-
virtual Reference<renderer::Surface> create_surface(const renderer::vulkan::VulkanContext &context) override¶
Creates a surface inside a gpu context and returns it NOTE: The window is not the owner of the surface and is not responsible for cleaning it before destruction.
- Parameters:
context – The GPU Context to create the surface in TODO: rename
VulkanContexttoGpuContext- Returns:
An owning reference to the Surface created
-
virtual void process_events() override¶
Handles the processing of all underlying window events
-
virtual bool should_close() const override¶
Checks if the window should be closed
-
virtual void close() override¶
Request a close to the window. NOTE: this will trigger a corresponding window event
-
virtual float get_dpi_factor() const override¶
It calculates the dpi factor using the density from GLFW physical size GLFW docs for dpi
-
virtual void maximize() override¶
-
virtual void center_window() override¶
-
virtual void set_vsync(bool enable) override¶
-
virtual void set_resizeable(bool enable) override¶
-
virtual glm::vec2 get_position() const override¶
-
GLFWwindow *get_handle() const¶
-
GlfwWindow(ProjectSettings &settings, const WindowProperties &properties, const CallbackConsumers &consumers)¶