I have the following code:
#[derive(Clone, Copy, Debug)]
#[repr(C)]
pub struct SdfVertex {
pub pos: Vec3F32,
pub color: Vec3F32,
pub tex: Vec2F32,
pub flat: f32,
}
I need to get the offset of color, tex relative to the start of a SdfVertex.
I know of https://docs.rs/field-offset/0.1.1/field_offset/macro.offset_of.html but it is not clear how to use it.
Can someone give me a 1 line example of how to get the offsets of color / tex?
Thanks!