Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants