Dynamically update a texture / sprite


I’m trying to render a video to a texture. I got it working somehow using an generated ImageBuffer and passing that to the update method:

texture.update(&mut window.encoder, &img)

Now I want to use this texture in a sprite, but that fails, because the texture is wrapped in an Rc and thus immutable.

Is there any way to dynamically update a sprite texture?

Hmm… this might be a weakness of the design in the sprite library. Can you open up an issue on the repo?