diff options
| author | hachem <im@hachem.wtf> | 2026-08-27 10:50:02 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-08-27 10:50:02 +0200 |
| commit | 90398614bcc9e1c1bde7a0f65a0db66173a1d8b4 (patch) | |
| tree | 1cd0e18d46e6eb16f33afcb9561aad4d4dfb3ba3 /src/core/application.h | |
| parent | 4b64b2bd17433f427197af3679c9c8f5ad5ad1a4 (diff) | |
add: window manager and opengl context
Diffstat (limited to 'src/core/application.h')
| -rw-r--r-- | src/core/application.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/application.h b/src/core/application.h index 1e4a08d..8df5afb 100644 --- a/src/core/application.h +++ b/src/core/application.h @@ -1,15 +1,20 @@ #pragma once #include <cstdint> +#include <memory> #include <string> namespace Hsdbg { + class Window; + class WindowManager; + struct ApplicationSpec { std::string name = "hsdbg"; uint32_t width = 1600; uint32_t height = 900; + bool vsync = true; }; class Application @@ -28,6 +33,7 @@ namespace Hsdbg auto run() -> void; auto close() -> void; + auto window() -> Window& { return *m_window; } auto spec() const -> const ApplicationSpec& { return m_spec; } auto is_running() const -> bool { return m_running; } auto delta_time() const -> float { return m_delta_time; } @@ -36,10 +42,13 @@ namespace Hsdbg private: auto update() -> void; + auto render() -> void; static Application* s_instance; ApplicationSpec m_spec; + std::unique_ptr<WindowManager> m_window_manager; + Window* m_window = nullptr; bool m_running = false; float m_delta_time = 0.0f; float m_time = 0.0f; |
