From 944393dabec6f08287765d43fa6904724d93767c Mon Sep 17 00:00:00 2001 From: Quaternions Date: Fri, 6 Oct 2023 15:45:49 -0700 Subject: [PATCH] free performance --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index c669bf6..e5c3b57 100644 --- a/src/main.rs +++ b/src/main.rs @@ -265,9 +265,9 @@ impl GlobalState{ let mut vertices = Vec::new(); let mut index_from_vertex = std::collections::HashMap::new();//:: let mut entities = Vec::new(); - //TODO: combine groups using the same render pattern - for group in model.groups { + //this mut be combined in a more complex way if the models use different render patterns per group let mut indices = Vec::new(); + for group in model.groups { for poly in group.polys { for end_index in 2..poly.vertices.len() { for &index in &[0, end_index - 1, end_index] { @@ -289,8 +289,8 @@ impl GlobalState{ } } } - entities.push(indices); } + entities.push(indices); models.push(model::ModelSingleTexture{ instances:model.instances, vertices,