diff options
Diffstat (limited to 'alligator_render/src/config.rs')
| -rw-r--r-- | alligator_render/src/config.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/alligator_render/src/config.rs b/alligator_render/src/config.rs index b289212..952e885 100644 --- a/alligator_render/src/config.rs +++ b/alligator_render/src/config.rs @@ -166,7 +166,7 @@ impl<'a> RenderWindowConfig<'a> { &self, supported_present_modes: &[wgpu::PresentMode], supported_alpha_modes: &[wgpu::CompositeAlphaMode], - texture_format: wgpu::TextureFormat, + supported_texture_formats: Vec<wgpu::TextureFormat>, ) -> wgpu::SurfaceConfiguration { let present_mode = Self::present_mode(self.vsync, supported_present_modes); let alpha_mode = Self::alpha_mode(supported_alpha_modes); @@ -174,12 +174,12 @@ impl<'a> RenderWindowConfig<'a> { // configuration for the surface wgpu::SurfaceConfiguration { usage: wgpu::TextureUsages::RENDER_ATTACHMENT, - format: texture_format, + format: supported_texture_formats[0], width: self.default_width.get(), height: self.default_height.get(), alpha_mode, present_mode, - view_formats: vec![texture_format], + view_formats: supported_texture_formats, } } |
