// ============================================= // Aster: window.h // Copyright (c) 2020-2024 Anish Bhobe // ============================================= #pragma once #include "global.h" #include "size.h" #include "EASTL/vector.h" #include #include struct SDL_Window; struct Window final { // fields SDL_Window *m_Window = nullptr; NameString m_Name; static std::atomic_uint64_t m_WindowCount; static std::atomic_bool m_IsGlfwInit; // Methods [[nodiscard]] bool Poll() const noexcept; 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]] Size2D GetSize() const; eastl::vector GetRequiredExtensions(); // Ctor/Dtor Window(cstr title, Size2D extent, b8 isFullScreen = false); ~Window(); // Move Window(Window &&other) noexcept; Window &operator=(Window &&other) noexcept; DISALLOW_COPY_AND_ASSIGN(Window); };