Skip to main content

init_setup

Function init_setup 

Source
pub fn init_setup<G: GraphicsApi>(
    device: &WgpuDevice,
    options: RuntimeOptions,
) -> WgpuSetup
Expand description

Like init_setup_async, but synchronous. On wasm, it is necessary to use init_setup_async instead.

A device brought up on a G other than AutoGraphicsApi is reached through the client this initializes, and is not among the devices Runtime::enumerate_devices lists: those ids index the auto backend’s adapters, which is what a client created lazily resolves them against.

§Panics

Where device pins a graphics API and G names another: see init_setup_async.