Updated the window to hold the vulkan context and a vulkan surface as well as providing a cast operator for the surface
This commit is contained in:
@@ -4,9 +4,13 @@
|
||||
#ifndef VK_SUCCESS
|
||||
#include <vulkan/vulkan.h>
|
||||
#endif
|
||||
#include <vulkan/vk_enum_string_helper.h>
|
||||
#include "containers/basalt_darray.h"
|
||||
|
||||
namespace basalt
|
||||
{
|
||||
class Context;
|
||||
|
||||
class Window
|
||||
{
|
||||
public:
|
||||
@@ -15,16 +19,19 @@ namespace basalt
|
||||
Window(Window&& other) noexcept;
|
||||
Window& operator =(Window&& other) noexcept;
|
||||
|
||||
Window(uint16_t width, uint16_t height, const char* title);
|
||||
Window(basalt::Context& ctx, uint16_t width, uint16_t height, const char* title);
|
||||
~Window(void) noexcept;
|
||||
|
||||
void swap(Window& other) noexcept;
|
||||
operator GLFWwindow* (void) const noexcept;
|
||||
operator VkSurfaceKHR (void) const noexcept;
|
||||
|
||||
const bool should_close(void) const noexcept;
|
||||
|
||||
protected:
|
||||
basalt::Context* ctx;
|
||||
GLFWwindow* window = nullptr;
|
||||
VkSurfaceKHR surface;
|
||||
const char* window_title = "N/A";
|
||||
uint16_t width = 0;
|
||||
uint16_t height = 0;
|
||||
|
||||
Reference in New Issue
Block a user