From 90398614bcc9e1c1bde7a0f65a0db66173a1d8b4 Mon Sep 17 00:00:00 2001 From: hachem Date: Thu, 27 Aug 2026 10:50:02 +0200 Subject: add: window manager and opengl context --- src/core/application.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/core/application.h') 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 +#include #include 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 m_window_manager; + Window* m_window = nullptr; bool m_running = false; float m_delta_time = 0.0f; float m_time = 0.0f; -- cgit v1.3