Make output format of iced_wgpu configurable
This commit is contained in:
parent
e680fd27e7
commit
be14aca075
11 changed files with 69 additions and 22 deletions
|
|
@ -40,11 +40,12 @@ pub fn main() {
|
|||
});
|
||||
|
||||
let surface = wgpu::Surface::create(&window);
|
||||
let format = wgpu::TextureFormat::Bgra8UnormSrgb;
|
||||
|
||||
let mut swap_chain = {
|
||||
let size = window.inner_size();
|
||||
|
||||
SwapChain::new(&device, &surface, size.width, size.height)
|
||||
SwapChain::new(&device, &surface, format, size.width, size.height)
|
||||
};
|
||||
let mut resized = false;
|
||||
|
||||
|
|
@ -163,6 +164,7 @@ pub fn main() {
|
|||
swap_chain = SwapChain::new(
|
||||
&device,
|
||||
&surface,
|
||||
format,
|
||||
size.width,
|
||||
size.height,
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue