You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this PR, #962, at some point, the author included this line in their MacOS implementation:
ns_view: 0 as *mut libc::c_void, // consumer of RawWindowHandle should determine this
This was, as far as I can see, a mistake. By default, using sdl2 and wgpu, this will create a crash, as ns_view must be well defined for WGPU to work, and nothing implies that this value is incorrect. Moreover, on a philosophical level, the trait and its cross-platform nature is to force sdl2 and other windowing wrappers to correctly give these handles to graphics libraries like WGPU, so it seems to me that SDL2 should properly define ns_view.
The example here shows the workflow required: 92b4309
My question now is...why? Why aren't we providing the correct ns_view by default, and why do we expect users to do this strange song and dance?
The text was updated successfully, but these errors were encountered:
There seem to have been some changes to raw-window-handle and WGPU since this issue was opened. I've updated the WindowWrapper hack and am posting it here in case it helps anyone. wrapper.rs.txt
Hello!
In this PR, #962, at some point, the author included this line in their MacOS implementation:
This was, as far as I can see, a mistake. By default, using sdl2 and wgpu, this will create a crash, as ns_view must be well defined for WGPU to work, and nothing implies that this value is incorrect. Moreover, on a philosophical level, the trait and its cross-platform nature is to force sdl2 and other windowing wrappers to correctly give these handles to graphics libraries like WGPU, so it seems to me that SDL2 should properly define
ns_view
.The example here shows the workflow required: 92b4309
My question now is...why? Why aren't we providing the correct
ns_view
by default, and why do we expect users to do this strange song and dance?The text was updated successfully, but these errors were encountered: