the trait bound `sdl2::video::Window: HasWindowHandle` is not satisfied
the following other types implement trait `HasWindowHandle`:
Box<H>
wgpu::raw_window_handle::WindowHandle<'_>
Rc<H>
Arc<H>
&H
&mut H
required for `&sdl2::video::Window` to implement `HasWindowHandle`
required for `&sdl2::video::Window` to implement `wgpu::WindowHandle`
required for `SurfaceTarget<'_>` to implement `From<&sdl2::video::Window>`
required for `&sdl2::video::Window` to implement `Into<SurfaceTarget<'_>>`
This leaves it stuck back in versions before wgpu 1.9.0.
This is the minimal reproducible environment:
///
/// Attempts to link the SDL2 window into wgpu to create a surface.
///
pub fn link_wgpu_to_sdl2<'a>(
instance: &'a wgpu::Instance,
window: &'a sdl2::video::Window,
) -> Result<wgpu::Surface<'a>, wgpu::CreateSurfaceError> {
unsafe { instance.create_surface(window) }
}
This leaves it stuck back in versions before wgpu 1.9.0.
This is the minimal reproducible environment: