// ============================================= // Aster: window.h // Copyright (c) 2020-2024 Anish Bhobe // ============================================= #pragma once #include "global.h" struct Context; struct Window final { GLFWwindow *m_Window = nullptr; // Methods [[nodiscard]] bool Poll() const noexcept { glfwPollEvents(); return !glfwWindowShouldClose(m_Window); } void RequestExit() const noexcept; void SetWindowSize(const vk::Extent2D &extent) const noexcept; void SetWindowSize(u32 width, u32 height) const noexcept; /// Actual size of the framebuffer being used for the window render. [[nodiscard]] vk::Extent2D GetSize() const; // Ctor/Dtor void Init(cstr title, vk::Extent2D extent, b8 isFullScreen = false); void Destroy(); };