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

texture_id should preallocate the id for textures that aren't loaded #66

Open
setzer22 opened this issue Oct 26, 2023 · 0 comments
Open
Milestone

Comments

@setzer22
Copy link
Collaborator

Currently it seems comfy returns a "missing" texture it whenever you call texture_id for a sprite that is currently being loaded. When you try caching these ids instead of invoking texture_id each frame, this gets inconvenient, because that'll cache the "missing" texture value and you'll keep drawing that each frame.

I think the whole thing would be more ergonomic if comfy instead preallocated texture ids when you start loading them, and then returns the right value immediately. Trying to draw a texture id that is not loaded yet, would be replaced by the "missing texture" transparently by the renderer.

@darthdeus darthdeus added this to the v0.3.0 milestone Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants