mirror of
https://github.com/hannobraun/Fornjot
synced 2025-09-26 19:18:22 +00:00
commit
4449fefa78
@ -43,14 +43,11 @@ pub struct Model {
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Material {
|
||||
pub name: String,
|
||||
pub diffuse_texture: super::texture::Texture,
|
||||
pub bind_group: wgpu::BindGroup,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Mesh {
|
||||
pub name: String,
|
||||
pub vertex_buffer: wgpu::Buffer,
|
||||
pub index_buffer: wgpu::Buffer,
|
||||
pub num_elements: u32,
|
||||
@ -126,11 +123,7 @@ pub fn load_model(
|
||||
label: None,
|
||||
});
|
||||
|
||||
materials.push(Material {
|
||||
name: m.name,
|
||||
diffuse_texture,
|
||||
bind_group,
|
||||
})
|
||||
materials.push(Material { bind_group })
|
||||
}
|
||||
|
||||
let meshes = models
|
||||
@ -164,7 +157,6 @@ pub fn load_model(
|
||||
});
|
||||
|
||||
Mesh {
|
||||
name: file_name.to_string(),
|
||||
vertex_buffer,
|
||||
index_buffer,
|
||||
num_elements: m.mesh.indices.len() as u32,
|
||||
|
@ -2,7 +2,6 @@ use image::{GenericImageView, ImageError};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Texture {
|
||||
pub texture: wgpu::Texture,
|
||||
pub view: wgpu::TextureView,
|
||||
pub sampler: wgpu::Sampler,
|
||||
}
|
||||
@ -77,10 +76,6 @@ impl Texture {
|
||||
..Default::default()
|
||||
});
|
||||
|
||||
Self {
|
||||
texture,
|
||||
view,
|
||||
sampler,
|
||||
}
|
||||
Self { view, sampler }
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
[toolchain]
|
||||
channel = "1.78.0"
|
||||
channel = "1.79.0"
|
||||
components = ["rustfmt", "clippy"]
|
||||
targets = [
|
||||
"aarch64-apple-ios",
|
||||
|
@ -26,7 +26,7 @@ features = ["blocking"]
|
||||
[dependencies.clap]
|
||||
version = "4.5.8"
|
||||
features = ["std", "derive", "env"]
|
||||
default_features = false
|
||||
default-features = false
|
||||
|
||||
[dependencies.serde]
|
||||
version = "1.0.204"
|
||||
|
Loading…
x
Reference in New Issue
Block a user