Library:
Added a very basic window object that essentially just wraps an GLFW window object. TODO: Set the window userdata pointer to point to its wrapping object
This commit is contained in:
32
include/vulkan/basalt_window.h
Normal file
32
include/vulkan/basalt_window.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
#define GLFW_INCLUDE_VULKAN
|
||||
#include "GLFW/glfw3.h"
|
||||
#ifndef VK_SUCCESS
|
||||
#include <vulkan/vulkan.h>
|
||||
#endif
|
||||
|
||||
namespace basalt
|
||||
{
|
||||
class Window
|
||||
{
|
||||
public:
|
||||
Window(const Window& src) = delete;
|
||||
Window& operator =(const Window& src) = delete;
|
||||
Window(Window&& other) noexcept;
|
||||
Window& operator =(Window&& other) noexcept;
|
||||
|
||||
Window(uint16_t width, uint16_t height, const char* title);
|
||||
~Window(void) noexcept;
|
||||
|
||||
void swap(Window& other) noexcept;
|
||||
operator GLFWwindow* (void) const noexcept;
|
||||
|
||||
const bool should_close(void) const noexcept;
|
||||
|
||||
protected:
|
||||
GLFWwindow* window = nullptr;
|
||||
const char* window_title = "N/A";
|
||||
uint16_t width = 0;
|
||||
uint16_t height = 0;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user