diff options
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/application.cpp | 10 | ||||
| -rw-r--r-- | src/core/application.h | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/core/application.cpp b/src/core/application.cpp index 1e6d343..7047d6a 100644 --- a/src/core/application.cpp +++ b/src/core/application.cpp @@ -5,6 +5,7 @@ #include "core/window.h" #include "core/window_manager.h" #include "debugger/debugger.h" +#include "ui/ui.h" #include <glad/gl.h> @@ -41,10 +42,12 @@ namespace Hsdbg m_window = &m_window_manager->create_window(window_spec); m_debugger = std::make_unique<Debugger>(); + m_ui = std::make_unique<Ui>(*m_window); } Application::~Application() { + m_ui.reset(); m_debugger.reset(); m_window = nullptr; @@ -110,10 +113,15 @@ namespace Hsdbg auto Application::render() -> void { + m_ui->begin_frame(); + m_ui->draw(*m_debugger); + 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); + glClearColor(0.05f, 0.05f, 0.06f, 1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + m_ui->end_frame(); } } diff --git a/src/core/application.h b/src/core/application.h index 2f5ffbe..fd72af2 100644 --- a/src/core/application.h +++ b/src/core/application.h @@ -7,6 +7,7 @@ namespace Hsdbg { class Debugger; + class Ui; class Window; class WindowManager; @@ -51,6 +52,7 @@ namespace Hsdbg ApplicationSpec m_spec; std::unique_ptr<WindowManager> m_window_manager; std::unique_ptr<Debugger> m_debugger; + std::unique_ptr<Ui> m_ui; Window* m_window = nullptr; bool m_running = false; float m_delta_time = 0.0f; |
