UIGrid: don't attempt to render every Entity every frame #52
Labels
No Label
Alpha Release Requirement
Bugfix
Demo Target
Documentation
Major Feature
Minor Feature
Refactoring & Cleanup
Tiny Feature
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: john/McRogueFace#52
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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() == false
entitiesfilters 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: