-
Is it possible now or in theory to skip redrawing the contents of a custom paint callback? I have an application where the I have no clue whether this is even feasible. If not, would this be possible when using |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
(This question may be old but maybe answering is still useful for someone out there!) Since egui has to redraw the entire screen and doesn't keep draw results for single rectangles around this isn't easily possible. Also, this would need an elaborate mechanism to determine when a redraw is necessary. However, you can implement this yourself by drawing to a texture that you keep around and only update when needed. Then inside the |
Beta Was this translation helpful? Give feedback.
(This question may be old but maybe answering is still useful for someone out there!)
Since egui has to redraw the entire screen and doesn't keep draw results for single rectangles around this isn't easily possible. Also, this would need an elaborate mechanism to determine when a redraw is necessary. However, you can implement this yourself by drawing to a texture that you keep around and only update when needed. Then inside the
CallbackTrait
you (always) composite that texture to egui