~/talk

2D Graph scene in Rust

Talkat RustLab 2021 · 2021-03-18..09-23· [rust]
links:none on file
slides:none on file

Built a proof‑of‑concept 2D GPU scene graph in Rust called scenegraph‑rs that targets WebGPU, implements rectangle and image nodes, composition, transforms and click events, and renders text by rasterizing to a texture on the CPU. The demo shows clickable buttons moving (works), pipelines and vertex/index buffers are created once and reused, and color changes update only uniforms. Major costs: fighting the borrow checker, using Rc/RefCell and id‑based graphs, single‑threaded design, and WebGPU spec instability.

AI-written summary · about

  1. 0:00Start
  2. 4:30The scenario • High performance GUI with smooth animations etc. • Possibly a low-powered embedded platform . Traditionally performance == C/C++ . But, C/C++ != safety convenience • Rust: "Fast, Reliable, Productive, Pick Three"
  3. 24:43Modern toolkits . Mostly still use imperative drawing • GPU acceleration is carefully added • Rarely GPU optimized from the ground up • Qt Quick 2 is a notable exception
  4. 28:14Scene Graph GUI composed of components . Components composed of nodes • Nodes backed by GPU primitives • The GPU can directly draw these nodes • i.e. no fancy tricks !!
  5. 43:11The problem . We write nodes directly against the GPU... . Which API do we use? • Qt Quick 2 used OpenGL (originally, now also RHI) • OpenGL used to work everywhere • OpenGL is dying, fast... • Vulkan, Metal and DX12 are the future . So we write nodes 3 times ?
  6. 45:22WebGPU to the rescue! . Basically Vulkan for the Web . But not just for the web... . Also tries to be the new OpenGL • Common higher level API that maps to Vulkan/Metal/DX12 • Reference implementation in Rust : • WARNING: not stable yet...
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.