diff options
Diffstat (limited to 'examples/integration_wgpu/src/main.rs')
-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( |