cuboid and cube pipeline working
This commit is contained in:
parent
4494b68c26
commit
912659bb52
13 changed files with 230 additions and 162 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue