Fix the point in time in the frame that we run and render the ImDebugger

Turns out it matters quite a lot. Will see if I can clean this up later.
This commit is contained in:
Henrik Rydgård
2026-08-09 18:29:33 +02:00
parent b67667cbd1
commit c65eb7d54f
3 changed files with 8 additions and 7 deletions
+3 -1
View File
@@ -187,7 +187,7 @@ void ScreenManager::resized() {
}
}
ScreenRenderFlags ScreenManager::render() {
ScreenRenderFlags ScreenManager::Render(std::function<void()> afterPreRender) {
using namespace Draw;
ScreenRenderFlags flags = ScreenRenderFlags::NONE;
@@ -203,6 +203,8 @@ ScreenRenderFlags ScreenManager::render() {
flags |= layer.screen->PreRender(mode);
}
afterPreRender();
// Now, start the final render pass. This is now the ONLY place where binding the null fb is allowed.
draw_->BindFramebufferAsRenderTarget(nullptr, {RPAction::CLEAR, RPAction::CLEAR, RPAction::CLEAR}, "BackBuffer");
getUIContext()->BeginFrame();