Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change get_preferred_format to get_supported_formats #2783

Merged
merged 10 commits into from
Jun 18, 2022
Prev Previous commit
Next Next commit
Replace pops with first
stevenhuyn committed Jun 18, 2022
commit 5ae5489b1075af6f0867e7f3b741cfd7ec386ac4
2 changes: 1 addition & 1 deletion wgpu/examples/framework.rs
Original file line number Diff line number Diff line change
@@ -201,7 +201,7 @@ fn start<E: Example>(
format: surface
.get_supported_formats(&adapter)
.unwrap()
.pop()
.first()
.unwrap(),
width: size.width,
height: size.height,
2 changes: 1 addition & 1 deletion wgpu/examples/hello-triangle/main.rs
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ async fn run(event_loop: EventLoop<()>, window: Window) {
let swapchain_format = surface
.get_supported_formats(&adapter)
.unwrap()
.pop()
.first()
.unwrap();

let render_pipeline = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor {
2 changes: 1 addition & 1 deletion wgpu/examples/hello-windows/main.rs
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ impl ViewportDesc {
.surface
.get_supported_formats(adapter)
.unwrap()
.pop()
.first()
.unwrap(),
width: size.width,
height: size.height,