Skip to main content

init_setup

Function init_setup 

Source
pub fn init_setup<G>(device: &WgpuDevice, options: RuntimeOptions) -> WgpuSetup
where G: GraphicsApi,
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. With msl enabled, an explicitly selected Metal API also panics if native MSL is unavailable.