Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sprite Atlas Disposal #9

Open
applebyter opened this issue Sep 9, 2021 · 0 comments
Open

Sprite Atlas Disposal #9

applebyter opened this issue Sep 9, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@applebyter
Copy link
Contributor

A sprite atlas is loaded once by AnimationRenderComponent and shared by all Entity instances representing the same game element, but the sprite atlas is disposed when the first entity using the AnimationRenderComponent is disposed.

Example

If you have Entity objects representing enemies, you want to be able to dispose of an enemy that no longer needs to be on the screen. Disposing one enemy object currently disposes their atlas, which is shared with all the other enemy objects. So all the other enemy objects fail to render.

Solution Options

Look into whether the atlas disposing can be moved out of the per-entity code.

@applebyter applebyter added the bug Something isn't working label Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant