Add printable Enum
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user