|
|
@@ -10,7 +10,6 @@ use std::io::{Cursor, Read};
|
|
|
use byteorder::*;
|
|
|
use log::*;
|
|
|
use thiserror::*;
|
|
|
-use wgpu::*;
|
|
|
|
|
|
#[derive(Debug, Error)]
|
|
|
pub enum Error {
|
|
|
@@ -313,7 +312,8 @@ impl<'a, A: Atlas> MeshReader<'a, A> {
|
|
|
}
|
|
|
|
|
|
/// Read and create a mesh on the GPU
|
|
|
- pub fn create<V: Vertex + std::fmt::Debug>(&self, device: &Device, bytes: &[u8]) -> Result<Mesh> {
|
|
|
+ #[cfg(feature = "mesh")]
|
|
|
+ pub fn create<V: Vertex>(&self, device: &wgpu::Device, bytes: &[u8]) -> Result<Mesh> {
|
|
|
let (vertices, indices) = self.read::<V>(bytes)?;
|
|
|
Ok(Mesh::new(device, &vertices, &indices))
|
|
|
}
|