Skip to content

Conversation

@lucycycy
Copy link
Contributor

@lucycycy lucycycy commented Sep 9, 2025

Prevent removed tiles from rendering when a TMX layer becomes empty by zeroing existing CustomCommand index draw counts at the start of updatePrimitives() and then setting counts only for the current frame.

Describe your changes

  • In FastTMXLayer::updatePrimitives(), add an early pass that calls setIndexDrawInfo(0, 0) on all existing entries in _customCommands.
  • Re-apply setIndexDrawInfo(start*6, count*6) only for the vertex-Z buckets used in the current frame.
  • No public API/ABI changes. Behavior is unchanged when the layer still has tiles; only empty-layer frames are affected.

Issue ticket number and link

N/A

Prevent removed tiles from rendering when a TMX layer becomes empty by zeroing existing `CustomCommand` index draw counts at the start of `updatePrimitives()` and then setting counts only for the current frame.
@halx99
Copy link
Collaborator

halx99 commented Sep 9, 2025

/clang-format

@axmol-bot
Copy link
Collaborator

👋 @halx99 Command /clang-format received. Running code formatting, please wait...

@axmol-bot
Copy link
Collaborator

✅ Formatting completed and changes have been committed to the PR branch: fix-tmxlayer.
@halx99 please refresh to see the latest code.

@halx99 halx99 merged commit eed6dbb into axmolengine:dev Sep 10, 2025
1 check failed
@lucycycy lucycycy deleted the fix-tmxlayer branch September 27, 2025 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants