diff options
| author | HampusM <hampus@hampusmat.com> | 2026-11-21 15:52:14 +0100 |
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2026-11-21 15:52:14 +0100 |
| commit | c152ce6b9047eb827ea096ef082d60916c2f3c80 (patch) | |
| tree | 50a73b81d27cea03307e40d75e0aae90f3745fc4 /engine/src | |
| parent | 01b155aa9e9bfe75e24747802cbd6be19b9183fe (diff) | |
refactor(engine): reduce size of mesh::vertex_buffer::VertexBuffer by 8 bytes
Diffstat (limited to 'engine/src')
| -rw-r--r-- | engine/src/mesh/vertex_buffer.rs | 6 |
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::<()>(); |
