|
|
@ -32,7 +32,7 @@ impl RuntimeVertexDef {
|
|
|
|
// https://github.com/tomaka/vulkano-examples/blob/gltf/gltf/gltf_system.rs
|
|
|
|
// https://github.com/tomaka/vulkano-examples/blob/gltf/gltf/gltf_system.rs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
num_vertices = 3;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// for (attribute_id, attribute) in primitive.attributes().enumerate() {
|
|
|
|
// for (attribute_id, attribute) in primitive.attributes().enumerate() {
|
|
|
@ -152,11 +152,18 @@ unsafe impl<I> VertexDefinition<I> for RuntimeVertexDef
|
|
|
|
AttributeInfo { offset: 0, format: binding.format }));
|
|
|
|
AttributeInfo { offset: 0, format: binding.format }));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// The number of actually bound inputs
|
|
|
|
let buffers = vec![
|
|
|
|
let buffers = vec![
|
|
|
|
(0, mem::size_of::<i32>(), InputRate::Vertex),
|
|
|
|
(0, mem::size_of::<i32>(), InputRate::Vertex),
|
|
|
|
|
|
|
|
(1, mem::size_of::<i32>(), InputRate::Vertex),
|
|
|
|
|
|
|
|
(2, mem::size_of::<i32>(), InputRate::Vertex),
|
|
|
|
|
|
|
|
(3, mem::size_of::<i32>(), InputRate::Vertex),
|
|
|
|
|
|
|
|
(4, mem::size_of::<i32>(), InputRate::Vertex),
|
|
|
|
|
|
|
|
(5, mem::size_of::<i32>(), InputRate::Vertex),
|
|
|
|
|
|
|
|
(6, mem::size_of::<i32>(), InputRate::Vertex),
|
|
|
|
].into_iter();
|
|
|
|
].into_iter();
|
|
|
|
|
|
|
|
|
|
|
|
Ok((buffers_iter, attributes.into_iter()))
|
|
|
|
Ok((buffers, attributes.into_iter()))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -172,4 +179,4 @@ unsafe impl VertexSource<Vec<Arc<dyn BufferAccess + Send + Sync>>> for RuntimeVe
|
|
|
|
1 // Number of instances
|
|
|
|
1 // Number of instances
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|