use enumflags2::*;

#[bitflags]
#[repr(u8)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum MeshFeature {
	Coloured,
	Normals,
	Textured,
	Rigged,

	ShortPos,
	ShortNormals,
	ShortUvs,
	ShortWeights
}

pub type MeshFeatures = BitFlags<MeshFeature>;

#[macro_export]
macro_rules! features {
	() => {
		MeshFeatures::empty()
	};
	($feat: tt) => {
		MeshFeature::$feat.into()
	};

	($feat: tt, $($others: tt),+) => {
		features!($feat) | features!($(others),+)
	};
}
