Add printable Enum

This commit is contained in:
Thraix
2023-05-01 18:23:22 +02:00
parent ca7286807a
commit ad69293faa
17 changed files with 122 additions and 76 deletions
+6 -7
View File
@@ -1,32 +1,31 @@
#pragma once
#include "copium/util/Common.h"
#include "copium/util/Enum.h"
#include <GLFW/glfw3.h>
#define CP_WINDOW_MODE_ENUMS Fullscreen, BorderlessWindowed, Windowed
CP_ENUM_CREATOR(Copium, WindowMode, CP_WINDOW_MODE_ENUMS);
namespace Copium
{
class Window final
{
CP_DELETE_COPY_AND_MOVE_CTOR(Window);
public:
enum class Mode
{
Fullscreen, BorderlessWindowed, Windowed
};
private:
GLFWwindow* window;
VkSurfaceKHR surface;
public:
Window(const std::string& windowName, int width, int height, Mode mode);
Window(const std::string& windowName, int width, int height, WindowMode mode);
~Window();
VkSurfaceKHR GetSurface() const;
GLFWwindow* GetWindow();
private:
void InitializeWindow(const std::string& windowName, int width, int height, Mode mode);
void InitializeWindow(const std::string& windowName, int width, int height, WindowMode mode);
void InitializeSurface();
static void FramebufferResizeCallback(GLFWwindow* glfwWindow, int width, int height);