mirror of
https://github.com/sotrh/learn-wgpu.git
synced 2024-11-16 06:12:55 +00:00
fixes #548
This commit is contained in:
parent
7a2d7b6f04
commit
30a6b4488e
@ -68,11 +68,7 @@ impl<'a> State<'a> {
|
|||||||
..Default::default()
|
..Default::default()
|
||||||
});
|
});
|
||||||
|
|
||||||
// # Safety
|
let surface = instance.create_surface(window).unwrap();
|
||||||
//
|
|
||||||
// The surface needs to live as long as the window that created it.
|
|
||||||
// State owns the window, so this should be safe.
|
|
||||||
let surface = unsafe { instance.create_surface(&window) }.unwrap();
|
|
||||||
|
|
||||||
let adapter = instance.request_adapter(
|
let adapter = instance.request_adapter(
|
||||||
&wgpu::RequestAdapterOptions {
|
&wgpu::RequestAdapterOptions {
|
||||||
|
Loading…
Reference in New Issue
Block a user