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

Improve _with #29

Open
Brian-ED opened this issue Jan 1, 2024 · 0 comments
Open

Improve _with #29

Brian-ED opened this issue Jan 1, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Brian-ED
Copy link
Owner

Brian-ED commented Jan 1, 2024

_with is implemented in a lot of places, like texture._with. It loads a texture for a function 𝕗 to use and then unloads.
The benifits are less mistakes since you now can't forget to unload. The negatives are that it gets ugly when nesting a lot to load multiple textures.
A few solutions exist, like making _with map over 𝕩 to load multiple textures, but how do you load a texture to be used for the next few frames and then unload then? what about if you don't know when you'll need to unload? I was thinking you could use recursion to solve this, but i'm unsure of a good solution.

@Brian-ED Brian-ED added the enhancement New feature or request label Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant