Skip to content

Commit be3c5ef

Browse files
committed
don't create an initial surface
1 parent 194528d commit be3c5ef

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

crates/bevy_render/src/lib.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -237,21 +237,21 @@ impl Plugin for RenderPlugin {
237237
backends,
238238
dx12_shader_compiler: settings.dx12_shader_compiler.clone(),
239239
});
240-
let surface = primary_window.map(|wrapper| unsafe {
241-
// SAFETY: Plugins should be set up on the main thread.
242-
let handle = wrapper.get_handle();
243-
instance
244-
.create_surface(&handle)
245-
.expect("Failed to create wgpu surface")
246-
});
247-
248-
eprintln!("==> {:?}", surface.as_ref());
249-
if let Some(surface) = surface.as_ref() {
250-
eprintln!("===> {:?}", surface.get_current_texture());
251-
}
240+
// let surface = primary_window.map(|wrapper| unsafe {
241+
// // SAFETY: Plugins should be set up on the main thread.
242+
// let handle = wrapper.get_handle();
243+
// instance
244+
// .create_surface(&handle)
245+
// .expect("Failed to create wgpu surface")
246+
// });
247+
248+
// eprintln!("==> {:?}", surface.as_ref());
249+
// if let Some(surface) = surface.as_ref() {
250+
// eprintln!("===> {:?}", surface.configure(device, config));
251+
// }
252252
let request_adapter_options = wgpu::RequestAdapterOptions {
253253
power_preference: settings.power_preference,
254-
compatible_surface: surface.as_ref(),
254+
// compatible_surface: surface.as_ref(),
255255
..Default::default()
256256
};
257257

0 commit comments

Comments
 (0)