Skip to content

Quadtree debug drawing broken — renders after renderer flush #1261

@obiot

Description

@obiot

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:

  1. GAME_BEFORE_DRAW
  2. renderer.clear() + stage draw
  3. renderer.flush() — batch submitted to GPU
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions