1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 05:40:03 -04:00

Create egui_wgpu::RendererOptions (#7601)

This commit is contained in:
Emil Ernerfeldt
2025-10-07 17:06:23 +02:00
committed by GitHub
parent 56b1def064
commit 9cb4e6a54e
6 changed files with 103 additions and 66 deletions

View File

@@ -173,9 +173,7 @@ impl RenderState {
config: &WgpuConfiguration,
instance: &wgpu::Instance,
compatible_surface: Option<&wgpu::Surface<'static>>,
depth_format: Option<wgpu::TextureFormat>,
msaa_samples: u32,
dithering: bool,
options: RendererOptions,
) -> Result<Self, WgpuError> {
profiling::scope!("RenderState::create"); // async yield give bad names using `profile_function`
@@ -244,13 +242,7 @@ impl RenderState {
};
let target_format = crate::preferred_framebuffer_format(&surface_formats)?;
let renderer = Renderer::new(
&device,
target_format,
depth_format,
msaa_samples,
dithering,
);
let renderer = Renderer::new(&device, target_format, options);
// On wasm, depending on feature flags, wgpu objects may or may not implement sync.
// It doesn't make sense to switch to Rc for that special usecase, so simply disable the lint.