cuboid and cube pipeline working

This commit is contained in:
zomseffen 2024-09-15 14:02:00 +02:00
parent 4494b68c26
commit 912659bb52
13 changed files with 230 additions and 162 deletions

View file

@ -47,12 +47,12 @@ pub fn load_model(data: &mut app_data::AppData, scene_handler: &mut scene::Scene
};
if let Some(index) = unique_vertices.get(&vertex) {
scene_handler.indices.push(*index as u32);
scene_handler.indices_cube.push(*index as u32);
} else {
let index = scene_handler.vertices.len();
unique_vertices.insert(vertex, index);
scene_handler.vertices.push(vertex);
scene_handler.indices.push(index as u32);
scene_handler.indices_cube.push(index as u32);
}
}
}