mirror of
https://github.com/hannobraun/Fornjot
synced 2025-10-13 11:28:14 +00:00
Make surface creation safe
This commit is contained in:
parent
1fb88651c7
commit
c99d92dfde
@ -44,12 +44,7 @@ impl Renderer {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// This is sound, as `window` is an object to create a surface upon.
|
// This is sound, as `window` is an object to create a surface upon.
|
||||||
let surface = unsafe {
|
let surface = instance.create_surface(screen.window())?;
|
||||||
instance.create_surface_unsafe(
|
|
||||||
wgpu::SurfaceTargetUnsafe::from_window(&screen.window())
|
|
||||||
.unwrap(),
|
|
||||||
)
|
|
||||||
}?;
|
|
||||||
|
|
||||||
for adapter in instance.enumerate_adapters(wgpu::Backends::all()) {
|
for adapter in instance.enumerate_adapters(wgpu::Backends::all()) {
|
||||||
debug!("Available adapter: {:?}", adapter.get_info());
|
debug!("Available adapter: {:?}", adapter.get_info());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user