[#1261] Fix quadtree debug drawing not rendering#1262
Merged
Conversation
_drawQuadTree() runs in GAME_AFTER_DRAW which fires after renderer.flush(). Add an explicit flush() after drawing so the quadtree lines are submitted to the GPU. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the debug plugin’s quadtree visualization when running with the WebGL renderer by ensuring quadtree draw calls are flushed after they are issued in the GAME_AFTER_DRAW hook (which runs after the engine’s main renderer.flush()).
Changes:
- Flushes the renderer after drawing the quadtree overlay so WebGL batched primitives are submitted.
- Bumps
@melonjs/debug-pluginversion to15.0.2. - Documents the fix in the debug plugin changelog.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/debug-plugin/src/debugPanel.js | Adds a post-quadtree renderer.flush() so the overlay renders when drawn after the main frame flush. |
| packages/debug-plugin/package.json | Version bump from 15.0.1 to 15.0.2. |
| packages/debug-plugin/CHANGELOG.md | Adds release notes for 15.0.2 describing the quadtree rendering fix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix quadtree debug visualization not rendering. The
_drawQuadTree()method runs inGAME_AFTER_DRAWwhich fires afterrenderer.flush(), so the draw calls were never submitted to the GPU.Fix: add an explicit
renderer.flush()after drawing the quadtree.Also bumps debug plugin to 15.0.2 with changelog entry.
Closes #1261
Test plan
🤖 Generated with Claude Code