diff options
| author | hachem <im@hachem.wtf> | 2026-08-20 02:27:02 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-08-20 02:40:07 +0200 |
| commit | 5b361d81dbd2af0d0e99b9eb1adebea76ff05db0 (patch) | |
| tree | 34db1df17e8c7248aeeb92156d635d31c2484e3f /src/Core/Application.h | |
| parent | e3abaaf59777258ba06705135a0cafcb5918ad12 (diff) | |
[chore]: MASSIVE refactor + more vulkan bs
Diffstat (limited to 'src/Core/Application.h')
| -rw-r--r-- | src/Core/Application.h | 66 |
1 files changed, 34 insertions, 32 deletions
diff --git a/src/Core/Application.h b/src/Core/Application.h index b715170..06c4e94 100644 --- a/src/Core/Application.h +++ b/src/Core/Application.h @@ -1,51 +1,53 @@ #pragma once -#include "StateManager.h" -#include "Memory.h" -#include "Window.h" -#include "Event.h" -#include "Log.h" +#include "state_manager.h" +#include "memory.h" +#include "window.h" +#include "event.h" +#include "log.h" -#include "Engine/Engine.h" +#include "engine/engine.h" namespace Donut { - class VulkanRenderer; // live-window Vulkan backend (Platform/Vulkan) + class VulkanRenderer; // live-window Vulkan backend (platform/vulkan) class Application { public: - Application(const std::string& name = "Donut", + Application(const std::string& name = "Donut", int width = 1280, int height = 720); ~Application(); - void Run(); - void Close(); + auto run() -> void; + auto close() -> void; + + auto get_window() -> Window& { return *m_window; } + auto get_state_manager() -> StateManager& { return *m_state_manager; } + auto get_engine() -> Engine& { return *m_engine; } + static auto get() -> Application& { return *s_instance; } - Window& GetWindow() { return *m_Window; } - StateManager& GetStateManager() { return *m_StateManager; } - Engine& GetEngine() { return *m_Engine; } - static Application& Get() { return *s_Instance; } private: - void OnInit(); - void OnShutdown(); - void OnUpdate(); - void OnRender(); - void OnEvent(Event& event); - void SetupDockingLayout(); - void BuildVulkanUI(); // ImGui UI built each frame on the Vulkan path + auto on_init() -> void; + auto on_shutdown() -> void; + auto on_update() -> void; + auto on_render() -> void; + auto on_event(Event& event) -> void; + auto setup_docking_layout() -> void; + auto build_vulkan_ui() -> void; // ImGui UI built each frame on the Vulkan path + private: - Scope<StateManager> m_StateManager; - Scope<Window> m_Window; - Scope<Engine> m_Engine; - Scope<VulkanRenderer> m_VulkanRenderer; // non-null only when the Vulkan API is selected + Scope<StateManager> m_state_manager; + Scope<Window> m_window; + Scope<Engine> m_engine; + Scope<VulkanRenderer> m_vulkan_renderer; // non-null only when the Vulkan API is selected + + bool m_running; + bool m_minimized; - bool m_Running; - bool m_Minimized; - - float m_DeltaTime = 0.0f; - float m_LastFrame = 0.0f; + float m_delta_time = 0.0f; + float m_last_frame = 0.0f; - static Application* s_Instance; + static Application* s_instance; }; -}
\ No newline at end of file +} |
