1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 23:00:04 -04:00

Add HarnessBuilder::with_render_options() (closes #7630) (#8060)

Allows to override the default `PREDICTABLE` render options, e.g. if
it's desired to create snapshots with the exact texture options used by
the app.

See #7630 for details / examples.
This commit is contained in:
Michael Grupp
2026-04-04 12:09:56 +02:00
committed by GitHub
parent c2b482ff7e
commit 0435d2a9a1
3 changed files with 40 additions and 5 deletions

View File

@@ -116,6 +116,11 @@ impl<'a, State> Harness<'a, State> {
#[cfg(feature = "snapshot")]
default_snapshot_options,
// rustfmt adds this weird indentation below.
// See: https://github.com/rust-lang/rustfmt/issues/5920
#[cfg(feature = "wgpu")]
render_options: _,
} = builder;
let ctx = ctx.unwrap_or_default();
ctx.set_theme(theme);