mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-03 17:38:27 +00:00
Remove unuse code
Rust 1.79 is starting to warn about those. For some reason, the unused fields weren't caught before.
This commit is contained in:
parent
d5c175f7fd
commit
8c241298e2
@ -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 }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user