summaryrefslogtreecommitdiff
path: root/engine/src/vertex.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2024-04-14 14:33:44 +0200
committerHampusM <hampus@hampusmat.com>2024-04-15 22:07:42 +0200
commit97bb50d42d7c1f475bf63861449a2162f665be26 (patch)
treeb25091d4ab06b60863b4ea1bf08f1ef36ad083a6 /engine/src/vertex.rs
parent73c5bb19e7274b3e4048f70a19a7b9a2d361bfa1 (diff)
refactor(engine): use OpenGL DSA functions
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