From 97bb50d42d7c1f475bf63861449a2162f665be26 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 14 Apr 2024 14:33:44 +0200 Subject: refactor(engine): use OpenGL DSA functions --- engine/src/vertex.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'engine/src/vertex.rs') diff --git a/engine/src/vertex.rs b/engine/src/vertex.rs index bb0e890..37a6c51 100644 --- a/engine/src/vertex.rs +++ b/engine/src/vertex.rs @@ -82,30 +82,31 @@ impl Vertex { pub(crate) fn attrs() -> &'static [Attribute] { + #[allow(clippy::cast_possible_truncation)] &[ Attribute { index: 0, component_type: AttributeComponentType::Float, component_cnt: AttributeComponentCnt::Three, - component_size: size_of::(), + component_size: size_of::() as u32, }, Attribute { index: 1, component_type: AttributeComponentType::Float, component_cnt: AttributeComponentCnt::Three, - component_size: size_of::(), + component_size: size_of::() as u32, }, Attribute { index: 2, component_type: AttributeComponentType::Float, component_cnt: AttributeComponentCnt::Two, - component_size: size_of::(), + component_size: size_of::() as u32, }, Attribute { index: 3, component_type: AttributeComponentType::Float, component_cnt: AttributeComponentCnt::Three, - component_size: size_of::(), + component_size: size_of::() as u32, }, ] } @@ -113,10 +114,10 @@ impl Vertex pub(crate) struct Attribute { - pub(crate) index: usize, + pub(crate) index: u32, pub(crate) component_type: AttributeComponentType, pub(crate) component_cnt: AttributeComponentCnt, - pub(crate) component_size: usize, + pub(crate) component_size: u32, } pub(crate) enum AttributeComponentType -- cgit v1.2.3-18-g5258