8000 Add `Context::current_pass_index` by emilk · Pull Request #7276 · emilk/egui · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add Context::current_pass_index #7276

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 30, 2025
Merged

Add Context::current_pass_index #7276

merged 1 commit into from
Jun 30, 2025

Conversation

emilk
Copy link
Owner
@emilk emilk commented Jun 30, 2025

This can be used by developers who wants to add diagnostics when there is a multi-pass egui frame.

@emilk emilk added the egui label Jun 30, 2025
@emilk emilk changed the title Add Context::current_pass_index Add Context::current_pass_index Jun 30, 2025
@emilk emilk merged commit d770cd5 into main Jun 30, 2025
48 checks passed
@emilk emilk deleted the emilk/current_pass_index branch June 30, 2025 08:41
Copy link

Preview available at https://egui-pr-preview.github.io/pr/7276-emilkcurrentpassindex
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

emilk added a commit to rerun-io/rerun that referenced this pull request Jun 30, 2025
…10434)

### Related
* #10406
* emilk/egui#7276

### What

Show an orange dot to warn about multi-pass layout in egui.

If it is shown, it means something called
`egui::Context::request_discard` the previous pass,
causing a multi-pass layout frame in egui.
This is used to cover up some visual glitches, but it is also
a bit costly and we shouldn't do it too often.

An infrequent blinking of the dot (e.g. when opening a new panel) is
expected,
but it should not be sustained.



![blink-dot](https://github.com/user-attachments/assets/599cd46e-e087-44a3-9153-b746005df319)

In this example the selection panel (outside the frame) shows a
`ListItem` scope for the first time, which results in a single
multi-pass frame.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0