Update Triangle.rs

This commit is contained in:
Werner
2022-04-02 18:01:13 -03:00
parent 832ea811e7
commit b0c04c6f7b

View File

@ -100,23 +100,7 @@ impl State for Triangle {
vertex: wgpu::VertexState { vertex: wgpu::VertexState {
module: &shader_module, module: &shader_module,
entry_point: "vs_main", entry_point: "vs_main",
buffers: &[wgpu::VertexBufferLayout { buffers: &[wgpu_layout],
array_stride: std::mem::size_of::<TriangleVertex>()
as wgpu::BufferAddress,
step_mode: wgpu::VertexStepMode::Vertex,
attributes: &[
wgpu::VertexAttribute {
offset: 0,
shader_location: 0,
format: wgpu::VertexFormat::Float32x3,
},
wgpu::VertexAttribute {
offset: std::mem::size_of::<[f32; 3]>() as wgpu::BufferAddress,
shader_location: 1,
format: wgpu::VertexFormat::Float32x3,
},
],
}],
}, },
fragment: Some(wgpu::FragmentState { fragment: Some(wgpu::FragmentState {
module: &shader_module, module: &shader_module,