forked from StrafesNET/strafe-client
why did they do it like that
This commit is contained in:
parent
eb376c1e68
commit
f8320c9df5
@ -138,11 +138,11 @@ async fn setup<E: Example>(title: &str) -> Setup {
|
|||||||
backends,
|
backends,
|
||||||
dx12_shader_compiler,
|
dx12_shader_compiler,
|
||||||
});
|
});
|
||||||
let (size, surface) = unsafe {
|
|
||||||
let size = window.inner_size();
|
let size = window.inner_size();
|
||||||
|
|
||||||
#[cfg(any(not(target_arch = "wasm32"), target_os = "emscripten"))]
|
#[cfg(any(not(target_arch = "wasm32"), target_os = "emscripten"))]
|
||||||
let surface = instance.create_surface(&window).unwrap();
|
let surface=unsafe{instance.create_surface(&window)}.unwrap();
|
||||||
#[cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))]
|
#[cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))]
|
||||||
let surface={
|
let surface={
|
||||||
if let Some(offscreen_canvas_setup) = &offscreen_canvas_setup {
|
if let Some(offscreen_canvas_setup) = &offscreen_canvas_setup {
|
||||||
@ -156,9 +156,6 @@ async fn setup<E: Example>(title: &str) -> Setup {
|
|||||||
}
|
}
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
(size, surface)
|
|
||||||
};
|
|
||||||
|
|
||||||
let adapter;
|
let adapter;
|
||||||
|
|
||||||
let optional_features = E::optional_features();
|
let optional_features = E::optional_features();
|
||||||
|
Loading…
Reference in New Issue
Block a user