summaryrefslogtreecommitdiffstats
path: root/wgpu/src/image.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-10-31 01:41:04 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-10-31 01:41:04 +0100
commit298c42ac5f208745cd3b23b3cc8f10f7c8769797 (patch)
treeed59801ab1194540fae6f8507a7eb83e152dcbd0 /wgpu/src/image.rs
parent85916c9e8710ee90cbf37d384acbb6d208ff1da3 (diff)
downloadiced-298c42ac5f208745cd3b23b3cc8f10f7c8769797.tar.gz
iced-298c42ac5f208745cd3b23b3cc8f10f7c8769797.tar.bz2
iced-298c42ac5f208745cd3b23b3cc8f10f7c8769797.zip
Replace `nalgebra` with `glam`
`glam` compiles much faster and leverages SIMD nicely.
Diffstat (limited to 'wgpu/src/image.rs')
-rw-r--r--wgpu/src/image.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/wgpu/src/image.rs b/wgpu/src/image.rs
index c42e1cd4..75cfa166 100644
--- a/wgpu/src/image.rs
+++ b/wgpu/src/image.rs
@@ -222,11 +222,9 @@ impl Pipeline {
bounds: Rectangle<u32>,
target: &wgpu::TextureView,
) {
- let matrix: [f32; 16] = transformation.into();
-
let transform_buffer = device
.create_buffer_mapped(16, wgpu::BufferUsage::COPY_SRC)
- .fill_from_slice(&matrix[..]);
+ .fill_from_slice(transformation.as_ref());
encoder.copy_buffer_to_buffer(
&transform_buffer,