From 2049e2dd2c105557a097e29e0d95d65f88dfa3bf Mon Sep 17 00:00:00 2001 From: Quaternions Date: Wed, 7 Feb 2024 16:22:11 -0800 Subject: [PATCH] get_instances_buffer_data: surely this is the same --- src/graphics.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/graphics.rs b/src/graphics.rs index 2e3261f..0762f41 100644 --- a/src/graphics.rs +++ b/src/graphics.rs @@ -997,7 +997,6 @@ const MODEL_BUFFER_SIZE_BYTES:usize=MODEL_BUFFER_SIZE*4; fn get_instances_buffer_data(instances:&[GraphicsModelInstance]) -> Vec { let mut raw = Vec::with_capacity(MODEL_BUFFER_SIZE*instances.len()); for (i,mi) in instances.iter().enumerate(){ - let mut v = raw.split_off(MODEL_BUFFER_SIZE*i); //model transform raw.extend_from_slice(&AsRef::<[f32; 4*4]>::as_ref(&mi.transform)[..]); //normal transform @@ -1009,7 +1008,6 @@ fn get_instances_buffer_data(instances:&[GraphicsModelInstance]) -> Vec { raw.extend_from_slice(&[0.0]); //color raw.extend_from_slice(AsRef::<[f32; 4]>::as_ref(&mi.color.get())); - raw.append(&mut v); } raw }