truce-gpu
wgpu rendering backend for the truce built-in GUI.
Overview
Provides WgpuBackend, a hardware-accelerated implementation of
truce_gui_types::RenderBackend via wgpu (Metal on macOS, DX12 on
Windows, Vulkan on Linux), plus the wgpu surface / swapchain glue. Uses
lyon for path tessellation and fontdue for glyph atlas generation.
Widgets render identically to the CPU path but with better performance
on complex UIs.
truce-gpu is an implementation detail of
truce-gui: the GpuEditor there wraps the built-in
widget runtime and renders through this backend. Plugins don't depend on
truce-gpu directly — they enable GPU rendering through truce-gui's
gpu feature.
Key types
WgpuBackend-- implementstruce_gui_types::RenderBackendusing wgpu
Usage
Opt into GPU rendering by enabling the gpu feature on truce-gui:
[]
= { = "0.48", = ["clap"] }
= { = "0.48", = ["gpu"] }
truce-gui pulls in truce-gpu transitively and routes the built-in
editor through WgpuBackend. No direct dependency and no per-editor
code: the same editor() impl works for both renderers.