|
|
@ -12,8 +12,8 @@ namespace Inferno { |
|
|
|
|
|
|
|
|
|
|
|
struct WindowProperties { |
|
|
|
struct WindowProperties { |
|
|
|
const char* title = "Inferno"; |
|
|
|
const char* title = "Inferno"; |
|
|
|
unsigned int width = 1280; |
|
|
|
int width = 1280; |
|
|
|
unsigned int height = 720; |
|
|
|
int height = 720; |
|
|
|
const char* fullscreen = "windowed"; // windowed/fullscreen/borderless
|
|
|
|
const char* fullscreen = "windowed"; // windowed/fullscreen/borderless
|
|
|
|
bool vsync = true; |
|
|
|
bool vsync = true; |
|
|
|
}; |
|
|
|
}; |
|
|
@ -23,6 +23,8 @@ namespace Inferno { |
|
|
|
Window(); |
|
|
|
Window(); |
|
|
|
virtual ~Window(); |
|
|
|
virtual ~Window(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// -----------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
void initialize(); |
|
|
|
void initialize(); |
|
|
|
void update(); |
|
|
|
void update(); |
|
|
|
// void render();
|
|
|
|
// void render();
|
|
|
@ -37,6 +39,7 @@ namespace Inferno { |
|
|
|
inline bool isVSync() const { return m_windowProperties.vsync; } |
|
|
|
inline bool isVSync() const { return m_windowProperties.vsync; } |
|
|
|
|
|
|
|
|
|
|
|
inline GLFWwindow* getWindow() const { return m_window; } |
|
|
|
inline GLFWwindow* getWindow() const { return m_window; } |
|
|
|
|
|
|
|
inline Context* getContext() const { return m_context; } |
|
|
|
|
|
|
|
|
|
|
|
inline void setEventCallback(std::function<void(Event&)> callback) { m_eventCallback = callback; } |
|
|
|
inline void setEventCallback(std::function<void(Event&)> callback) { m_eventCallback = callback; } |
|
|
|
|
|
|
|
|
|
|
|