use immutable buffers for chunk data

This commit is contained in:
griffi-gh 2023-11-22 12:01:49 +01:00
parent d75a5fa3cb
commit 467e61cb70

View file

@ -234,8 +234,8 @@ fn process_completed_tasks(
}
//apply the mesh
let vertex_buffer = VertexBuffer::new(&renderer.display, &vertices).unwrap();
let index_buffer = IndexBuffer::new(&renderer.display, PrimitiveType::TrianglesList, &indexes).unwrap();
let vertex_buffer = VertexBuffer::immutable(&renderer.display, &vertices).unwrap();
let index_buffer = IndexBuffer::immutable(&renderer.display, PrimitiveType::TrianglesList, &indexes).unwrap();
let mesh = ChunkMesh {
vertex_buffer,
index_buffer,