diff --git a/Cargo.toml b/Cargo.toml index 7cd3548..bfe3ed9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,7 +55,7 @@ wgpu = "0.12" bytemuck = { version = "1.4", features = ["derive"] } cgmath = "0.18" env_logger = "0.9" -image = { version = "0.23", default-features = false, features = ["jpeg"] } +image = { version = "0.23", default-features = false, features = ["png"] } imgui-winit-support = { version = "0.8", default-features = false, features = ["winit-26"] } pollster = "0.2" raw-window-handle = "0.4" diff --git a/examples/cube.rs b/examples/cube.rs index 97e10e9..452618c 100644 --- a/examples/cube.rs +++ b/examples/cube.rs @@ -265,6 +265,7 @@ impl Example { }, depth_stencil: None, multisample: wgpu::MultisampleState::default(), + multiview: None, }); // Done @@ -537,7 +538,7 @@ fn main() { // Only render example to example_texture if thw window is not collapsed example.setup_camera(&queue, size); example.render( - &renderer.textures.get(example_texture_id).unwrap().view(), + renderer.textures.get(example_texture_id).unwrap().view(), &device, &queue, ); diff --git a/examples/custom-texture.rs b/examples/custom-texture.rs index 0618db2..6d08c7b 100644 --- a/examples/custom-texture.rs +++ b/examples/custom-texture.rs @@ -106,9 +106,9 @@ fn main() { let mut last_frame = Instant::now(); // Set up Lenna texture - let lenna_bytes = include_bytes!("../resources/Lenna.jpg"); + let lenna_bytes = include_bytes!("../resources/checker.png"); let image = - image::load_from_memory_with_format(lenna_bytes, ImageFormat::Jpeg).expect("invalid image"); + image::load_from_memory_with_format(lenna_bytes, ImageFormat::Png).expect("invalid image"); let image = image.to_bgra8(); let (width, height) = image.dimensions(); let raw_data = image.into_raw(); @@ -200,7 +200,7 @@ fn main() { .size([400.0, 600.0], Condition::FirstUseEver) .build(&ui, || { ui.text("Hello textures!"); - ui.text("Say hello to Lenna.jpg"); + ui.text("Say hello to checker.png"); Image::new(lenna_texture_id, size).build(&ui); }); } diff --git a/resources/Lenna.jpg b/resources/Lenna.jpg deleted file mode 100644 index 9e1df85..0000000 Binary files a/resources/Lenna.jpg and /dev/null differ diff --git a/resources/checker.png b/resources/checker.png new file mode 100644 index 0000000..a395db2 Binary files /dev/null and b/resources/checker.png differ diff --git a/resources/cube.wgsl b/resources/cube.wgsl index 9051a6c..4bd4305 100644 --- a/resources/cube.wgsl +++ b/resources/cube.wgsl @@ -3,7 +3,6 @@ struct VertexOutput { [[builtin(position)]] position: vec4; }; -[[block]] struct Locals { transform: mat4x4; };