mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
This is useful if you're using `SDL2`
```rust
let canvas = window.into_canvas().build().unwrap();
let metal_layer = unsafe { sdl2::sys::SDL_RenderGetMetalLayer(canvas.raw()) };
let surface = instance.create_surface_with_metal_layer(metal_layer);
```