mirror of
https://github.com/guilhermewerner/wgpu-renderer
synced 2025-06-15 05:14:20 +00:00
Update Triangle.rs
This commit is contained in:
@ -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,
|
||||||
|
Reference in New Issue
Block a user