#pragma once #include #include #include #include #include #ifndef WINDOW_PTR #define WINDOW_PTR void* #endif #define VULKAN_HPP_NO_STRUCT_CONSTRUCTORS #include /* * Window class - abstracts away implementation/platform-specific realities of window * * Needs to be able to query and set window size, as well as report required instance extensions. * Completely seperate from input. */ struct Window { /* Window title and dimensions. On failure, Window::win is nullptr, exception is thrown if DEBUG */ Window(const std::string& title, u32 width, u32 height); ~Window(); void close(); void setDimensions(const u32 x, const u32 y); void getDimensions(u32& w, u32& h); std::vector requiredExtensions(); vk::Extent2D getDimensions(); vk::SurfaceKHR getSurface(vk::Instance& inst); std::unique_ptr getInput(); private: WINDOW_PTR win = nullptr; u32 width, height; };