diff options
author | 2021-10-13 19:40:29 +0200 | |
---|---|---|
committer | 2021-10-13 19:40:32 +0200 | |
commit | 65f690b07559a36fe8bfcba31edd851c5c286704 (patch) | |
tree | 76479eb8675daa9ae4ce1c2b31d606c99ec5fe29 /examples | |
parent | 3aae45c1913e6a6f60b009f19d00d10add7ad11e (diff) | |
download | iced-65f690b07559a36fe8bfcba31edd851c5c286704.tar.gz iced-65f690b07559a36fe8bfcba31edd851c5c286704.tar.bz2 iced-65f690b07559a36fe8bfcba31edd851c5c286704.zip |
Update wgpu to 0.11
Diffstat (limited to 'examples')
-rw-r--r-- | examples/integration_wgpu/src/main.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/integration_wgpu/src/main.rs b/examples/integration_wgpu/src/main.rs index 7ef148bc..bf36c7a5 100644 --- a/examples/integration_wgpu/src/main.rs +++ b/examples/integration_wgpu/src/main.rs @@ -39,6 +39,7 @@ pub fn main() { .request_adapter(&wgpu::RequestAdapterOptions { power_preference: wgpu::PowerPreference::HighPerformance, compatible_surface: Some(&surface), + force_fallback_adapter: false, }) .await .expect("Request adapter"); @@ -172,7 +173,7 @@ pub fn main() { resized = false; } - match surface.get_current_frame() { + match surface.get_current_texture() { Ok(frame) => { let mut encoder = device.create_command_encoder( &wgpu::CommandEncoderDescriptor { label: None }, @@ -180,7 +181,7 @@ pub fn main() { let program = state.program(); - let view = frame.output.texture.create_view(&wgpu::TextureViewDescriptor::default()); + let view = frame.texture.create_view(&wgpu::TextureViewDescriptor::default()); { // We clear the frame @@ -208,6 +209,7 @@ pub fn main() { // Then we submit the work staging_belt.finish(); queue.submit(Some(encoder.finish())); + frame.present(); // Update the mouse cursor window.set_cursor_icon( |