aboutsummaryrefslogtreecommitdiff
path: root/src/core/application.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/application.cpp')
-rw-r--r--src/core/application.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/application.cpp b/src/core/application.cpp
index 7047d6a..54ee788 100644
--- a/src/core/application.cpp
+++ b/src/core/application.cpp
@@ -113,15 +113,17 @@ namespace Hsdbg
auto Application::render() -> void
{
- m_ui->begin_frame();
- m_ui->draw(*m_debugger);
-
+ // clear the whole framebuffer at the very start of the frame, before any
+ // drawing, so nothing from the previous frame can survive underneath
glViewport(0, 0,
static_cast<GLsizei>(m_window->framebuffer_width()),
static_cast<GLsizei>(m_window->framebuffer_height()));
+ glDisable(GL_SCISSOR_TEST);
glClearColor(0.05f, 0.05f, 0.06f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ m_ui->begin_frame();
+ m_ui->draw(*m_debugger);
m_ui->end_frame();
}
}