Merge pull request #516 from splashdust/patch-1

Correct outdated line of example code in surface tutorial
pull/519/head
Ben Hansen 6 months ago committed by GitHub
commit 7ea7dbede0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -162,7 +162,7 @@ The `limits` field describes the limit of certain types of resources that we can
// sRGB surfaces, you'll need to account for that when drawing to the frame. // sRGB surfaces, you'll need to account for that when drawing to the frame.
let surface_format = surface_caps.formats.iter() let surface_format = surface_caps.formats.iter()
.copied() .copied()
.filter(|f| f.describe().srgb) .filter(|f| f.is_srgb())
.next() .next()
.unwrap_or(surface_caps.formats[0]); .unwrap_or(surface_caps.formats[0]);
let config = wgpu::SurfaceConfiguration { let config = wgpu::SurfaceConfiguration {

Loading…
Cancel
Save