-
The problemI am trying to create a multi-window multi-threaded application using winit (0.30.5) and wgpu (22.1.0). First, the window can only be created with reference to winit ActiveEventLoop. Except at least on Windows, creating the surface on the render thread causes an "underlying handle not available" error.
And manually ensure the surface is dropped before the window. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Storing the |
Beta Was this translation helpful? Give feedback.
-
Are you passing a Here is what I am doing: pub async fn new(window: Arc<Window>) -> Self {
let (width, height) = window.inner_size().into();
let scale = window.scale_factor() as f32;
let instance = wgpu::Instance::default();
let surface = instance.create_surface(window).unwrap(); |
Beta Was this translation helpful? Give feedback.
Are you passing a
clone()
of theArc<Window>
directly intoinstance.create_surface
?Here is what I am doing: