Skip to content

Commit

Permalink
debugger: only render when open
Browse files Browse the repository at this point in the history
  • Loading branch information
redthing1 committed Jul 15, 2024
1 parent 2824208 commit 533e27b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions source/re/ng/diag/debugger.d
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,19 @@ debug class Debugger {
}

public void render() {
if (!inspector.open && !console.open) {
// nothing to render
return;
}

raylib.BeginTextureMode(_render_target);
raylib.ClearBackground(Colors.BLANK);

if (inspector.open)
inspector.render();
if (console.open)
console.render();

raylib.EndTextureMode();

// draw render target
Expand Down

0 comments on commit 533e27b

Please sign in to comment.