Skip to content

Commit ddcb839

Browse files
authored
Merge pull request #1262 from melonjs/fix/quadtree-debug-drawing
[#1261] Fix quadtree debug drawing not rendering
2 parents f0a7267 + 58f8d7c commit ddcb839

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

packages/debug-plugin/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 15.0.2
4+
5+
### Bug Fixes
6+
- Fixed quadtree debug visualization not rendering — draw calls were issued after `renderer.flush()`, so the quadtree lines were never submitted to the GPU
7+
38
## 15.0.1
49

510
### Bug Fixes

packages/debug-plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@melonjs/debug-plugin",
3-
"version": "15.0.1",
3+
"version": "15.0.2",
44
"description": "melonJS debug plugin",
55
"homepage": "https://github.com/melonjs/melonJS/tree/master/packages/debug-plugin#readme",
66
"type": "module",

packages/debug-plugin/src/debugPanel.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,9 @@ export class DebugPanel {
298298
this._drawQuadTreeNode(renderer, game.world.broadphase);
299299
renderer.translate(x, y);
300300
renderer.restore();
301+
// flush is needed because this runs after GAME_AFTER_DRAW,
302+
// which is emitted after the main renderer.flush()
303+
renderer.flush();
301304
}
302305

303306
/** @private */

0 commit comments

Comments
 (0)