UIGrid: don't attempt to render every Entity every frame #52
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:procgen
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#52
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?
12 refactor: UIGrid should skip entities that are not in bounds [Depends on next feature and the feature after that]
Depends on:
Desirable behavior in conjunction with #63 (Z-order):
Entities are a list of shared pointers. Can use something like partial_sort_copy to go through the list to sort (based on Z-order) into a vector.
But at the risk of prematurely optimizing, we could use a sort method that:
ignores
visible() == falseentitiesfilters out of render bounds entities
yoinks the sprites to draw out of the UIEntity objects, and just holds on to sprite and on-grid render coordinates
Possibly: Cache this rendering vector until it's invalidated by changes to center_x, center_y, zoom, or the cached entities.
problems with caching: