hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/src/core/application.cpp
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2024-10-10 14:17:34 +0200
committerhachem <im@hachem.wtf>2024-10-10 14:17:34 +0200
commit6a3dbf44bb8056f3f4554282f092132332ac7f4a (patch)
tree686d3d8b6f40d9dd7159173bb48b049c73f5d1a3 /src/core/application.cpp
parent78c72c3b3e42e3e33afe6cd78ae4bc9db09a59f4 (diff)
feat: debugger interface
Diffstat (limited to 'src/core/application.cpp')
-rw-r--r--src/core/application.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/application.cpp b/src/core/application.cpp
index 7322212..1e6d343 100644
--- a/src/core/application.cpp
+++ b/src/core/application.cpp
@@ -4,6 +4,7 @@
#include "core/log.h"
#include "core/window.h"
#include "core/window_manager.h"
+#include "debugger/debugger.h"
#include <glad/gl.h>
@@ -16,7 +17,6 @@ namespace Hsdbg
using Clock = std::chrono::steady_clock;
constexpr float MAX_DELTA_TIME = 0.25f;
-
constexpr double MINIMIZED_WAIT_TIMEOUT = 0.1;
}
@@ -39,10 +39,14 @@ namespace Hsdbg
window_spec.vsync = m_spec.vsync;
m_window = &m_window_manager->create_window(window_spec);
+
+ m_debugger = std::make_unique<Debugger>();
}
Application::~Application()
{
+ m_debugger.reset();
+
m_window = nullptr;
m_window_manager.reset();
@@ -101,15 +105,14 @@ namespace Hsdbg
auto Application::update() -> void
{
+ m_debugger->update();
}
auto Application::render() -> void
{
- glViewport(0,
- 0,
+ glViewport(0, 0,
static_cast<GLsizei>(m_window->framebuffer_width()),
static_cast<GLsizei>(m_window->framebuffer_height()));
-
glClearColor(0.09f, 0.09f, 0.11f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
}