Open Kaifuny opened 10 months ago
You have to use the raw-window-handle
implementation to get the ns_view
pointer
You have to use the
raw-window-handle
implementation to get thens_view
pointer
I noticed that the logs for the release version of winit have instructions for using raw_window_handle. But I didn't find any example or description of winit with raw_window_handle.
You might want to look at https://github.com/norse-rs/raw-window-metal which takes care of part of the conversion :)
@Kaifuny, there is an example of using raw window handle 0.6 with latest winit 0.29 by skia-safe
@Rottenfront that link points to the main repo here which is still on Winit 0.27. Did you mean to point to a fork?
@MarijnS95 oh, I'm sorry, I meant this https://github.com/rust-skia/rust-skia/blob/master/skia-safe/examples/metal-window/main.rs
Nice, yeah part of that is what raw-window-metal
abstracts away for you (though not by using the metal-rs
type yet).
Example does not support the latest winit
winit = 0.29.0 api has undergone a destructive change. Can't get NSView via window.ns_view(), set MetalView inside window.
I don't know what to do and would like help