Skip to main content

Module host

Module host 

Source
Expand description

A self-contained native host: owns a wgpu stack built from a raw window handle and drives any number of SSPlayers with it.

Instance / Surface / Device / Queue live here and the players borrow device and queue every frame. All of the wgpu work for the C face is in this module and the swapchain it shares with the web face (surface.rs), so ffi.rs stays pure ABI translation.

It is plain Rust, so a Rust host that has a window handle rather than a winit Window can use it directly instead of assembling wgpu itself.

Players live here, behind PlayerId, because the C face cannot hold a &mut SSPlayer across calls. roster.rs does that bookkeeping.

Structs§

NativeHost
A window-owning wgpu host and the players drawing into it.
NativeHostConfig
How to build a NativeHost.
PlayerId
Names one player owned by a NativeHost. Names one value in a Roster. Safe to hold past its removal.

Constants§

STENCIL_FORMAT
Depth/stencil format allocated when masking is enabled; the depth aspect is unused. Matches the native viewer.