summaryrefslogtreecommitdiff
path: root/alligator_render/src/config.rs
diff options
context:
space:
mode:
authorMicha White <botahamec@outlook.com>2023-02-04 11:41:22 -0500
committerMicha White <botahamec@outlook.com>2023-02-04 11:41:22 -0500
commite838982d1abe4134f83a3f4e9db0a3bfb8ebc926 (patch)
tree3c13a7de2e3089de1d25f369aec69f23d075a38e /alligator_render/src/config.rs
parent3201cf932ac9d6568b57433e47e7aaf68453b568 (diff)
Fix colors
Diffstat (limited to 'alligator_render/src/config.rs')
-rw-r--r--alligator_render/src/config.rs6
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,
}
}