Introduce Math.hpp and use typedef to make replacing glm with something else in the future simpler
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include "../../Math/Math.hpp"
|
||||
#include "../PlatformEnums.hpp"
|
||||
#include "../ICloseable.hpp"
|
||||
#include <string>
|
||||
@@ -28,8 +28,8 @@ namespace openVulkanoCpp
|
||||
|
||||
struct WindowConfiguration
|
||||
{
|
||||
uint32_t width = 1280, height = 720;
|
||||
int posX = 0, posY = 0;
|
||||
Math::Vector2ui size{1280, 720};
|
||||
Math::Vector2i position{0, 0};
|
||||
std::string title = "Window Title";
|
||||
WindowMode windowMode = WINDOWED;
|
||||
};
|
||||
@@ -47,25 +47,20 @@ namespace openVulkanoCpp
|
||||
|
||||
virtual WindowMode GetWindowMode() = 0;
|
||||
virtual void SetWindowMode(WindowMode) = 0;
|
||||
virtual void SetFullscreen() { SetWindowMode(FULLSCREEN); }
|
||||
virtual void SetWindowed() { SetWindowMode(WINDOWED); }
|
||||
inline void SetFullscreen() { SetWindowMode(FULLSCREEN); }
|
||||
inline void SetWindowed() { SetWindowMode(WINDOWED); }
|
||||
|
||||
virtual const WindowConfiguration& GetWindowConfiguration() = 0;
|
||||
virtual uint32_t GetWidth() = 0;
|
||||
virtual uint32_t GetHeight() = 0;
|
||||
virtual void GetSize(int* width, int* height) = 0;
|
||||
virtual void GetSize(uint32_t* width, uint32_t* height) = 0;
|
||||
virtual glm::ivec2 GetSize() = 0;
|
||||
inline uint32_t GetWidth() { return GetSize().x; }
|
||||
inline uint32_t GetHeight() { return GetSize().y; }
|
||||
virtual Math::Vector2ui GetSize() = 0;
|
||||
virtual void SetSize(uint32_t width, uint32_t height) = 0;
|
||||
virtual void SetSize(glm::ivec2 size) { SetSize(size.x, size.y); }
|
||||
inline void SetSize(Math::Vector2ui size) { SetSize(size.x, size.y); }
|
||||
virtual void SetSizeLimits(int minWidth, int minHeight, int maxWidth, int maxHeight) = 0;
|
||||
|
||||
virtual int GetPositionX() = 0;
|
||||
virtual int GetPositionY() = 0;
|
||||
virtual void GetPosition(int* x, int* y) = 0;
|
||||
virtual glm::ivec2 GetPosition() = 0;
|
||||
virtual Math::Vector2i GetPosition() = 0;
|
||||
virtual void SetPosition(int posX, int posY) = 0;
|
||||
virtual void SetPosition(glm::ivec2 pos) = 0;
|
||||
inline void SetPosition(Math::Vector2i pos) { SetPosition(pos.x, pos.y); };
|
||||
|
||||
virtual void Show() = 0;
|
||||
virtual void Hide() = 0;
|
||||
|
||||
Reference in New Issue
Block a user