commit
bb6e06127e
|
@ -26,8 +26,8 @@ qr_code = ["iced_graphics/qr_code"]
|
||||||
default_system_font = ["iced_graphics/font-source"]
|
default_system_font = ["iced_graphics/font-source"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
wgpu = "0.8"
|
wgpu = "0.9"
|
||||||
wgpu_glyph = "0.12"
|
wgpu_glyph = "0.13"
|
||||||
glyph_brush = "0.7"
|
glyph_brush = "0.7"
|
||||||
raw-window-handle = "0.3"
|
raw-window-handle = "0.3"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
|
|
|
@ -165,33 +165,13 @@ impl Pipeline {
|
||||||
wgpu::VertexBufferLayout {
|
wgpu::VertexBufferLayout {
|
||||||
array_stride: mem::size_of::<Instance>() as u64,
|
array_stride: mem::size_of::<Instance>() as u64,
|
||||||
step_mode: wgpu::InputStepMode::Instance,
|
step_mode: wgpu::InputStepMode::Instance,
|
||||||
attributes: &[
|
attributes: &wgpu::vertex_attr_array!(
|
||||||
wgpu::VertexAttribute {
|
1 => Float32x2,
|
||||||
shader_location: 1,
|
2 => Float32x2,
|
||||||
format: wgpu::VertexFormat::Float32x2,
|
3 => Float32x2,
|
||||||
offset: 0,
|
4 => Float32x2,
|
||||||
},
|
5 => Sint32,
|
||||||
wgpu::VertexAttribute {
|
),
|
||||||
shader_location: 2,
|
|
||||||
format: wgpu::VertexFormat::Float32x2,
|
|
||||||
offset: 4 * 2,
|
|
||||||
},
|
|
||||||
wgpu::VertexAttribute {
|
|
||||||
shader_location: 3,
|
|
||||||
format: wgpu::VertexFormat::Float32x2,
|
|
||||||
offset: 4 * 4,
|
|
||||||
},
|
|
||||||
wgpu::VertexAttribute {
|
|
||||||
shader_location: 4,
|
|
||||||
format: wgpu::VertexFormat::Float32x2,
|
|
||||||
offset: 4 * 6,
|
|
||||||
},
|
|
||||||
wgpu::VertexAttribute {
|
|
||||||
shader_location: 5,
|
|
||||||
format: wgpu::VertexFormat::Sint32,
|
|
||||||
offset: 4 * 8,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
|
@ -87,38 +87,14 @@ impl Pipeline {
|
||||||
wgpu::VertexBufferLayout {
|
wgpu::VertexBufferLayout {
|
||||||
array_stride: mem::size_of::<layer::Quad>() as u64,
|
array_stride: mem::size_of::<layer::Quad>() as u64,
|
||||||
step_mode: wgpu::InputStepMode::Instance,
|
step_mode: wgpu::InputStepMode::Instance,
|
||||||
attributes: &[
|
attributes: &wgpu::vertex_attr_array!(
|
||||||
wgpu::VertexAttribute {
|
1 => Float32x2,
|
||||||
shader_location: 1,
|
2 => Float32x2,
|
||||||
format: wgpu::VertexFormat::Float32x2,
|
3 => Float32x4,
|
||||||
offset: 0,
|
4 => Float32x4,
|
||||||
},
|
5 => Float32,
|
||||||
wgpu::VertexAttribute {
|
6 => Float32,
|
||||||
shader_location: 2,
|
),
|
||||||
format: wgpu::VertexFormat::Float32x2,
|
|
||||||
offset: 4 * 2,
|
|
||||||
},
|
|
||||||
wgpu::VertexAttribute {
|
|
||||||
shader_location: 3,
|
|
||||||
format: wgpu::VertexFormat::Float32x4,
|
|
||||||
offset: 4 * (2 + 2),
|
|
||||||
},
|
|
||||||
wgpu::VertexAttribute {
|
|
||||||
shader_location: 4,
|
|
||||||
format: wgpu::VertexFormat::Float32x4,
|
|
||||||
offset: 4 * (2 + 2 + 4),
|
|
||||||
},
|
|
||||||
wgpu::VertexAttribute {
|
|
||||||
shader_location: 5,
|
|
||||||
format: wgpu::VertexFormat::Float32,
|
|
||||||
offset: 4 * (2 + 2 + 4 + 4),
|
|
||||||
},
|
|
||||||
wgpu::VertexAttribute {
|
|
||||||
shader_location: 6,
|
|
||||||
format: wgpu::VertexFormat::Float32,
|
|
||||||
offset: 4 * (2 + 2 + 4 + 4 + 1),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
|
@ -150,20 +150,12 @@ impl Pipeline {
|
||||||
buffers: &[wgpu::VertexBufferLayout {
|
buffers: &[wgpu::VertexBufferLayout {
|
||||||
array_stride: mem::size_of::<Vertex2D>() as u64,
|
array_stride: mem::size_of::<Vertex2D>() as u64,
|
||||||
step_mode: wgpu::InputStepMode::Vertex,
|
step_mode: wgpu::InputStepMode::Vertex,
|
||||||
attributes: &[
|
attributes: &wgpu::vertex_attr_array!(
|
||||||
// Position
|
// Position
|
||||||
wgpu::VertexAttribute {
|
0 => Float32x2,
|
||||||
shader_location: 0,
|
|
||||||
format: wgpu::VertexFormat::Float32x2,
|
|
||||||
offset: 0,
|
|
||||||
},
|
|
||||||
// Color
|
// Color
|
||||||
wgpu::VertexAttribute {
|
1 => Float32x4,
|
||||||
shader_location: 1,
|
),
|
||||||
format: wgpu::VertexFormat::Float32x4,
|
|
||||||
offset: 4 * 2,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}],
|
}],
|
||||||
},
|
},
|
||||||
fragment: Some(wgpu::FragmentState {
|
fragment: Some(wgpu::FragmentState {
|
||||||
|
|
Loading…
Reference in New Issue