Skip to content

Commit

Permalink
Fix custom-texture example
Browse files Browse the repository at this point in the history
This bug was making `cargo test` fail. But there are no tests, oh well!
  • Loading branch information
parasyte authored and Yatekii committed Jan 27, 2023
1 parent 86334e0 commit 8df0ce1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/custom-texture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ fn main() {
let lenna_bytes = include_bytes!("../resources/checker.png");
let image =
image::load_from_memory_with_format(lenna_bytes, ImageFormat::Png).expect("invalid image");
let image = image.to_bgra8();
let image = image.to_rgba8();
let (width, height) = image.dimensions();
let raw_data = image.into_raw();

Expand All @@ -121,6 +121,7 @@ fn main() {
..Default::default()
},
label: Some("lenna texture"),
format: Some(wgpu::TextureFormat::Rgba8Unorm),
..Default::default()
};

Expand Down

0 comments on commit 8df0ce1

Please sign in to comment.