summaryrefslogtreecommitdiff
path: root/engine/src/vertex.rs
diff options
context:
space:
mode:
Diffstat (limited to 'engine/src/vertex.rs')
-rw-r--r--engine/src/vertex.rs13
1 files changed, 7 insertions, 6 deletions
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::<f32>(),
+ component_size: size_of::<f32>() as u32,
},
Attribute {
index: 1,
component_type: AttributeComponentType::Float,
component_cnt: AttributeComponentCnt::Three,
- component_size: size_of::<f32>(),
+ component_size: size_of::<f32>() as u32,
},
Attribute {
index: 2,
component_type: AttributeComponentType::Float,
component_cnt: AttributeComponentCnt::Two,
- component_size: size_of::<f32>(),
+ component_size: size_of::<f32>() as u32,
},
Attribute {
index: 3,
component_type: AttributeComponentType::Float,
component_cnt: AttributeComponentCnt::Three,
- component_size: size_of::<f32>(),
+ component_size: size_of::<f32>() 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