hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/src/core/application.h
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2025-08-14 00:02:01 +0200
committerhachem <im@hachem.wtf>2025-08-14 00:02:01 +0200
commit1b251bd174527951eec220ecbcb7eca89328e5b8 (patch)
treec47632a340b4cbdd97812f8c92798fc36146558c /src/core/application.h
parent1ac0f136629ce4046a5f6529cf3d1e51e96df408 (diff)
feat: state manager
Diffstat (limited to 'src/core/application.h')
-rw-r--r--src/core/application.h36
1 files changed, 5 insertions, 31 deletions
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<StateManager> m_state_manager;
std::unique_ptr<Window> m_window;
+
bool m_running;
bool m_minimized;
-
- std::shared_ptr<VertexArray> m_vertex_array;
- std::shared_ptr<VertexBuffer> m_vertex_buffer;
- std::shared_ptr<IndexBuffer> m_index_buffer;
- std::shared_ptr<Shader> m_shader;
- std::shared_ptr<Texture2D> m_texture;
-
- std::shared_ptr<Shader> m_compute_shader;
- std::shared_ptr<Texture2D> m_processed_texture;
- float m_compute_brightness;
- float m_compute_contrast;
- float m_compute_saturation;
- bool m_use_compute_shader;
-
- std::unique_ptr<Camera> 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;
};