summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-10-31 17:52:21 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-10-31 17:52:21 +0700
commite70a6be93762af535387623a998ccc0a0aa64d5c (patch)
tree653397c8a968cb56b806003b39e960d4492cc48f /examples
parentc9ed15782c3a62fcbfe56a141837b384ada82aaa (diff)
parent8a2a7f7e2144542b47c1d259f296ad7dcc5f3cf9 (diff)
downloadiced-e70a6be93762af535387623a998ccc0a0aa64d5c.tar.gz
iced-e70a6be93762af535387623a998ccc0a0aa64d5c.tar.bz2
iced-e70a6be93762af535387623a998ccc0a0aa64d5c.zip
Merge branch 'master' into remove-renderer-traits
Diffstat (limited to 'examples')
-rw-r--r--examples/integration_wgpu/src/main.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/integration_wgpu/src/main.rs b/examples/integration_wgpu/src/main.rs
index e1d691f0..d1000748 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");
@@ -171,7 +172,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 },
@@ -179,7 +180,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
@@ -209,6 +210,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(