From 1b251bd174527951eec220ecbcb7eca89328e5b8 Mon Sep 17 00:00:00 2001 From: hachem Date: Thu, 14 Aug 2025 00:02:01 +0200 Subject: feat: state manager --- src/core/application.h | 36 +++++------------------------------- 1 file changed, 5 insertions(+), 31 deletions(-) (limited to 'src/core/application.h') diff --git a/src/core/application.h b/src/core/application.h index fe04ff7..326e541 100644 --- a/src/core/application.h +++ b/src/core/application.h @@ -5,15 +5,9 @@ #include "window.h" #include "event.h" -#include "camera.h" +#include "state_manager.h" #include "log.h" -#include "rendering/vertex_array.h" -#include "rendering/vertex_buffer.h" -#include "rendering/index_buffer.h" -#include "rendering/shader.h" -#include "rendering/texture.h" - namespace Donut { class Application @@ -34,35 +28,15 @@ namespace Donut void on_update(); void on_render(); void on_event(Event& event); - void update_texture(); private: + std::unique_ptr m_state_manager; std::unique_ptr m_window; + bool m_running; bool m_minimized; - - std::shared_ptr m_vertex_array; - std::shared_ptr m_vertex_buffer; - std::shared_ptr m_index_buffer; - std::shared_ptr m_shader; - std::shared_ptr m_texture; - - std::shared_ptr m_compute_shader; - std::shared_ptr m_processed_texture; - float m_compute_brightness; - float m_compute_contrast; - float m_compute_saturation; - bool m_use_compute_shader; - - std::unique_ptr m_camera; - bool m_keys[1024] = { false }; - bool m_first_mouse = true; - float m_last_x = 0.0f; - float m_last_y = 0.0f; - float m_delta_time = 0.0f; - float m_last_frame = 0.0f; - bool m_mouse_dragging = false; - float m_texture_time = 0.0f; + float m_delta_time = 0.0f; + float m_last_frame = 0.0f; static Application* s_instance; }; -- cgit v1.3