Expand description
This crates provides bindings between egui
and wgpu.
If you’re targeting WebGL you also need to turn on the
webgl
feature of the wgpu
crate:
# Enable both WebGL and WebGPU backends on web.
wgpu = { version = "*", features = ["webgpu", "webgl"] }
You can control whether WebGL or WebGPU will be picked at runtime by setting
WgpuConfiguration::supported_backends
.
The default is to prefer WebGPU and fall back on WebGL.
§Feature flags
puffin
— Enable profiling with thepuffin
crate.winit
— Enablewinit
integration. On Linux, requires eitherwayland
orx11
wayland
— Enables Wayland support for winit.x11
— Enables x11 support for winit.fragile-send-sync-non-atomic-wasm
(enabled by default) — Make the rendererSync
on wasm, exploiting that by default wasm isn’t multithreaded. It may make code easier, expecially when targeting both native and web. On native most wgpu objects are send and sync, on the web they are not (by nature of the WebGPU specification). This is not supported in multithreaded WASM. Thus that usage is guarded against with compiler errors in wgpu.
Modules§
- A cross-platform graphics and compute library based on WebGPU.
Structs§
- You can use this to do custom
wgpu
rendering in an egui app. - Access to the render state for egui.
- Renderer for a egui based GUI.
- Information about the screen used for rendering.
- Configuration for using wgpu with eframe or the egui-wgpu winit feature.
Enums§
- Specifies which action should be taken as consequence of a
wgpu::SurfaceError
- An error produced by egui-wgpu.
Traits§
- A callback trait that can be used to compose an
epaint::PaintCallback
viaCallback
for custom WGPU rendering.
Functions§
- A human-readable summary about an adapter
- Take’s epi’s depth/stencil bits and returns the corresponding wgpu format.
- Find the framebuffer format that egui prefers
Type Aliases§
- You can use this for storage when implementing
CallbackTrait
.