Update wgpu to 0.11

This commit is contained in:
Poly 2021-10-13 19:40:29 +02:00
parent 3aae45c191
commit 65f690b075
3 changed files with 9 additions and 6 deletions

View file

@ -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(