summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2026-11-21 15:52:14 +0100
committerHampusM <hampus@hampusmat.com>2026-11-21 15:52:14 +0100
commitc152ce6b9047eb827ea096ef082d60916c2f3c80 (patch)
tree50a73b81d27cea03307e40d75e0aae90f3745fc4
parent01b155aa9e9bfe75e24747802cbd6be19b9183fe (diff)
refactor(engine): reduce size of mesh::vertex_buffer::VertexBuffer by 8 bytes
-rw-r--r--engine/src/mesh/vertex_buffer.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/engine/src/mesh/vertex_buffer.rs b/engine/src/mesh/vertex_buffer.rs
index 64edc58..440bde9 100644
--- a/engine/src/mesh/vertex_buffer.rs
+++ b/engine/src/mesh/vertex_buffer.rs
@@ -70,7 +70,7 @@ pub struct VertexBuffer
{
buf: Vec<u8>,
vertex_size: usize,
- vertex_attr_props: Vec<VertexAttrProperties>,
+ vertex_attr_props: Box<[VertexAttrProperties]>,
}
impl VertexBuffer
@@ -92,7 +92,7 @@ impl VertexBuffer
Self {
buf: buffer,
vertex_size,
- vertex_attr_props: vertex_attr_props.to_vec(),
+ vertex_attr_props: vertex_attr_props.to_vec().into_boxed_slice(),
}
}
@@ -107,7 +107,7 @@ impl VertexBuffer
layout: ty.layout(),
byte_offset: 0,
})
- .collect::<Vec<_>>();
+ .collect::<Box<[_]>>();
let mut vertex_layout = Layout::new::<()>();