diff --git a/src/canvas/shader/dynamic_vertex.rs b/src/canvas/shader/dynamic_vertex.rs index 348dc6e5..c3ba5f60 100644 --- a/src/canvas/shader/dynamic_vertex.rs +++ b/src/canvas/shader/dynamic_vertex.rs @@ -32,7 +32,7 @@ impl RuntimeVertexDef { // https://github.com/tomaka/vulkano-examples/blob/gltf/gltf/gltf_system.rs - + num_vertices = 3; // for (attribute_id, attribute) in primitive.attributes().enumerate() { @@ -152,11 +152,18 @@ unsafe impl VertexDefinition for RuntimeVertexDef AttributeInfo { offset: 0, format: binding.format })); } + // The number of actually bound inputs let buffers = vec![ (0, mem::size_of::(), InputRate::Vertex), + (1, mem::size_of::(), InputRate::Vertex), + (2, mem::size_of::(), InputRate::Vertex), + (3, mem::size_of::(), InputRate::Vertex), + (4, mem::size_of::(), InputRate::Vertex), + (5, mem::size_of::(), InputRate::Vertex), + (6, mem::size_of::(), InputRate::Vertex), ].into_iter(); - Ok((buffers_iter, attributes.into_iter())) + Ok((buffers, attributes.into_iter())) } } @@ -172,4 +179,4 @@ unsafe impl VertexSource>> for RuntimeVe 1 // Number of instances ) } -} \ No newline at end of file +}