wgpu icon indicating copy to clipboard operation
wgpu copied to clipboard

SDL2 implementation broken

Open Khalzz opened this issue 4 months ago • 2 comments

WGPU is not working with SDL2 binding for rust, or at least i have not been able to make it work, since the surface creation requires access to a raw_window_handle and somehow, even though the sdl2 crate haves it as a feature it does not exists or at least it doesnt work.

If somebody has tried using sdl2 with the last release i wish i could get the way you can access to the raw window handle from this.

Khalzz avatar Apr 30 '24 04:04 Khalzz

That would be an issue in https://github.com/Rust-SDL2/rust-sdl2 more likely? Can you describe in a bit more detail the apis that don't work? Note that there's two ways in wgpu to create a surface by now, a safe variant and an unsafe one. Both take their own dedicated enum type which describes all the types of window handle that work with it

Wumpf avatar Apr 30 '24 08:04 Wumpf

In any case, only SDL_SysWMinfo.{x11, wl} is bound.

https://docs.rs/sdl2-sys/latest/x86_64-pc-windows-msvc/sdl2_sys/union.SDL_SysWMinfo__bindgen_ty_1.html

https://docs.rs/sdl2-sys/latest/x86_64-pc-windows-msvc/src/sdl2_sys/opt/rustwide/target/x86_64-pc-windows-msvc/debug/build/sdl2-sys-0ce64f9730a30f98/out/sdl_bindings.rs.html#37378-37383

tasogare3710 avatar May 02 '24 05:05 tasogare3710