Skip to content

Conversation

@hydra
Copy link

@hydra hydra commented Oct 30, 2025

I struggled for over an hour to figure out how to force a refresh from either the main thread or a background thread to no avail. Ended up asking in the egui discord server and was pointed at request_repaint_of, but there's no usages of this method in the egui codebase, nor did the existing demo showcase this.

Recording.2025-10-30.163040.mp4
  • I have followed the instructions in the PR template

@github-actions
Copy link

Preview is being built...

Preview will be available at https://egui-pr-preview.github.io/pr/7676-improve-deferred-viewport-example-1

View snapshot changes at kitdiff

@hydra hydra force-pushed the improve-deferred-viewport-example-1 branch from c7f2a6e to 413486b Compare October 30, 2025 15:42
@hydra hydra marked this pull request as ready for review October 30, 2025 15:43
hydra added 2 commits November 6, 2025 14:30
* Now there is an example of request_repaint, request_repaint_of and request_repaint_after in a single demo so the effects of each can be seen.
@hydra
Copy link
Author

hydra commented Nov 6, 2025

Today I encountered a bug (#7686) when using multiple viewports so I updated this PR so it highlights the current behavior with request_repaint (or request_repaint_of) and a background thread, and request_repaint_after and request_repaint_of on the main thread.

Thus IMHO regardless of when #7686 is fixed, there's value in merging this PR now so that a) people can discover how to repaint deferred viewports, and b) so that it can be used when testing newer versions of egui and to help prevent regressions.

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

Successfully merging this pull request may close these issues.

1 participant