Skip to content

How to dynamically rerender a image #4253

Discussion options

You must be logged in to vote

You have to call Context::forget_image when you want the image to be reloaded. Note that doing that on every frame might increase the CPU usage significantly, so you might want to add some check that the file has changed, such as checking the modified timestamp. The default egui texture loader does not do this automatically, but if you want you can also create your own loaders with this functionality so you don't have to do it everywhere in the code. I talked about that in #3501 (comment).

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by UnknownSuperficialNight
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants