From 1776dc4c39f2747c45993f1a9b6ea16d15505a0a Mon Sep 17 00:00:00 2001 From: Quaternions Date: Tue, 5 Sep 2023 15:10:31 -0700 Subject: [PATCH] add comments about moving data --- src/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.rs b/src/main.rs index 70d9233..9f971cf 100644 --- a/src/main.rs +++ b/src/main.rs @@ -487,6 +487,8 @@ impl strafe_client::framework::Example for Skybox { ], label: Some("Camera"), }); + + //drain the modeldata vec so entities can be /moved/ to models.entities let mut models = Vec::::new(); for (i,modeldata) in modeldatas.drain(..).enumerate() { let model_uniforms = get_transform_uniform_data(&modeldata.transform); @@ -505,6 +507,7 @@ impl strafe_client::framework::Example for Skybox { ], label: Some(format!("Model{}",i).as_str()), }); + //all of these are being moved here models.push(Model{ transform: modeldata.transform, entities: modeldata.entities,