summaryrefslogtreecommitdiffstats
path: root/wgpu/src/triangle.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2021-06-22 11:39:18 +0200
committerLibravatar GitHub <noreply@github.com>2021-06-22 11:39:18 +0200
commitbb6e06127e15e5eb2b95c765488d75f25f8252ef (patch)
tree11ec9945e20780eab9dc1c99044e7bdeaaf508a5 /wgpu/src/triangle.rs
parente68da229b384fbe78514dab0b13c8eb4637f4f5d (diff)
parenta53e7559fe01ee072d4f0533ecf1facec741b9e4 (diff)
downloadiced-bb6e06127e15e5eb2b95c765488d75f25f8252ef.tar.gz
iced-bb6e06127e15e5eb2b95c765488d75f25f8252ef.tar.bz2
iced-bb6e06127e15e5eb2b95c765488d75f25f8252ef.zip
Merge pull request #925 from PolyMeilex/master
Update `wgpu` to `0.9`
Diffstat (limited to 'wgpu/src/triangle.rs')
-rw-r--r--wgpu/src/triangle.rs16
1 files changed, 4 insertions, 12 deletions
diff --git a/wgpu/src/triangle.rs b/wgpu/src/triangle.rs
index 8636b331..65b2b7b0 100644
--- a/wgpu/src/triangle.rs
+++ b/wgpu/src/triangle.rs
@@ -150,20 +150,12 @@ impl Pipeline {
buffers: &[wgpu::VertexBufferLayout {
array_stride: mem::size_of::<Vertex2D>() as u64,
step_mode: wgpu::InputStepMode::Vertex,
- attributes: &[
+ attributes: &wgpu::vertex_attr_array!(
// Position
- wgpu::VertexAttribute {
- shader_location: 0,
- format: wgpu::VertexFormat::Float32x2,
- offset: 0,
- },
+ 0 => Float32x2,
// Color
- wgpu::VertexAttribute {
- shader_location: 1,
- format: wgpu::VertexFormat::Float32x4,
- offset: 4 * 2,
- },
- ],
+ 1 => Float32x4,
+ ),
}],
},
fragment: Some(wgpu::FragmentState {