The debug panel's quadtree visualization doesn't render correctly because _drawQuadTree() is called in the GAME_AFTER_DRAW event handler, which fires after renderer.flush() in the application draw loop.
The draw sequence is:
GAME_BEFORE_DRAW
renderer.clear() + stage draw
renderer.flush() — batch submitted to GPU
GAME_AFTER_DRAW — quadtree draws here, after flush
The quadtree draw calls go into a new batch that never gets flushed (it's cleared on the next frame's renderer.clear()).
Fix
Add video.renderer.flush() after the quadtree drawing in _drawQuadTree(), or move the drawing to before the flush.
The debug panel's quadtree visualization doesn't render correctly because
_drawQuadTree()is called in theGAME_AFTER_DRAWevent handler, which fires afterrenderer.flush()in the application draw loop.The draw sequence is:
GAME_BEFORE_DRAWrenderer.clear()+ stage drawrenderer.flush()— batch submitted to GPUGAME_AFTER_DRAW— quadtree draws here, after flushThe quadtree draw calls go into a new batch that never gets flushed (it's cleared on the next frame's
renderer.clear()).Fix
Add
video.renderer.flush()after the quadtree drawing in_drawQuadTree(), or move the drawing to before the flush.