Grid Layer Dirty Flags and RenderTexture Caching #148
Labels
No labels
Alpha Release Requirement
Bugfix
Demo Target
Documentation
Major Feature
Minor Feature
priority:tier1-active
priority:tier2-foundation
priority:tier3-future
priority:tier4-deferred
Refactoring & Cleanup
system:animation
system:documentation
system:grid
system:input
system:performance
system:python-binding
system:rendering
system:ui-hierarchy
Tiny Feature
workflow:blocked
workflow:needs-benchmark
workflow:needs-documentation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
john/McRogueFace#148
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Overview
Apply the #144 dirty flag pattern to Grid layers. Each layer caches its rendered output to a RenderTexture and only re-renders when content changes.
Problem
Current Grid re-renders all content every frame:
Solution
Per-layer dirty tracking and RenderTexture caching:
Dirty Flag Triggers
Mark layer dirty when:
layer.set(x, y, value)- cell content changeslayer.texturechanged (for TileLayers)Do NOT mark dirty for:
grid.centerchanges (viewport pan) - just blit different regiongrid.zoomchanges - scale the cached textureExpected Performance
Implementation
sf::RenderTextureandbool dirtyto layer classesmarkDirty()method to layerslayer.set()to callmarkDirty()Relationship to Other Issues
Definition of Done