|
@@ -97,8 +97,7 @@ impl<'a, A: Atlas> MeshReader<'a, A> {
|
|
|
|
|
|
|
|
/// Extract vertices and indices from file contents
|
|
/// Extract vertices and indices from file contents
|
|
|
/// If using wgpu you can use `create` to also upload it to the gpu
|
|
/// If using wgpu you can use `create` to also upload it to the gpu
|
|
|
- // TODO: remove debug
|
|
|
|
|
- pub fn read<V: Vertex + std::fmt::Debug>(&self, bytes: &[u8]) -> Result<(Vec<V>, Vec<Index>)> {
|
|
|
|
|
|
|
+ pub fn read<V: Vertex>(&self, bytes: &[u8]) -> Result<(Vec<V>, Vec<Index>)> {
|
|
|
let mut bytes = Cursor::new(bytes);
|
|
let mut bytes = Cursor::new(bytes);
|
|
|
let bytes = &mut bytes;
|
|
let bytes = &mut bytes;
|
|
|
let mut header = [0; 5];
|
|
let mut header = [0; 5];
|
|
@@ -289,7 +288,6 @@ impl<'a, A: Atlas> MeshReader<'a, A> {
|
|
|
} else {
|
|
} else {
|
|
|
([0; 4], [0.0; 4]
|
|
([0; 4], [0.0; 4]
|
|
|
};*/
|
|
};*/
|
|
|
- trace!("Read vertex {pos:?}");
|
|
|
|
|
Ok(V::new(pos, col, normals, uvs, /*bones, weights*/))
|
|
Ok(V::new(pos, col, normals, uvs, /*bones, weights*/))
|
|
|
}).collect::<Result<Vec<_>>>()
|
|
}).collect::<Result<Vec<_>>>()
|
|
|
})
|
|
})
|