albedo_backend: Improve Primitive API
Closed this issue · 0 comments
DavidPeicho commented
- Make
AttributeSlice
a generic over the underlying slice:
let index = primitive.atribute("POSITION");
if let Some(slice) = primitive.attribute_slice_f32(index) {
for v in slice {
v = v + glam::Vec3(1.0, 1.0, 1.0);
}
}
- Create interleaved vector from
Vec<V: Pod>
- This needs to be unsafe to reinterpret the vector