Expand description
Platform window bridging for baseview / wgpu.
WgpuBackend::from_window consumes a baseview::Window; that
window exposes raw-window-handle 0.5 handles but wgpu wants 0.6,
so the bridge re-encodes per platform here. Lives in truce-gpu
so the wgpu pipeline crate is self-contained; the per-OS
HWND/NSView lookups + DPI queries live next door in
truce_gui::platform.
Functions§
- create_
wgpu_ ⚠surface - Bridge a baseview raw-window-handle 0.5 to a wgpu-compatible
SurfaceTargetUnsafeusing rwh 0.6 types. - editor_
instance_ descriptor wgpu::InstanceDescriptorfor editor surfaces, pinning the DX12 shader compiler to FXC. Mirror oftruce_gui::platform::editor_instance_descriptor- see it for why the wgpu-29 DX12 default (dynamic DXC) breaks inside Pro Tools. Keep the two copies in sync.- editor_
wgpu_ backends - wgpu backends for an editor surface embedded in a host-owned
child window. Mirror of
truce_gui::platform::editor_wgpu_backends(truce-gpu can’t depend on truce-gui without a dep cycle). Windows is DX12 (the only backend feature compiled in on Windows), macOS is Metal, Linux keepsPRIMARY. Keep the two copies in sync.