Skip to content

Add Context::current_pass_index - #7276

Merged
emilk merged 1 commit into
mainfrom
emilk/current_pass_index
Jun 30, 2025
Merged

emilk merged 1 commit into
mainfrom
emilk/current_pass_index

Conversation

@emilk

@emilk emilk commented Jun 30, 2025

Copy link
Copy Markdown
Owner

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
@emilk
emilk deleted the emilk/current_pass_index branch June 30, 2025 08:41
@github-actions

Copy link
Copy Markdown

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