diff options
Diffstat (limited to 'shared/src/resources.rs')
-rw-r--r-- | shared/src/resources.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/shared/src/resources.rs b/shared/src/resources.rs index 651eb4b..a677755 100644 --- a/shared/src/resources.rs +++ b/shared/src/resources.rs @@ -15,7 +15,7 @@ pub struct Part { pub fragment_shader_data: Option<Resource>, pub vertex_shader: Option<Resource>, pub vertex_shader_data: Option<Resource>, - pub texture: Option<Resource>, + pub texture: Vec<Resource>, } #[derive(Debug, Default, Clone)] @@ -91,7 +91,7 @@ impl Part { if let Some(x) = &self.vertex_shader_data { write_kv(w, b"vertex_shader_data", &x.0); } - if let Some(x) = &self.texture { + for x in &self.vertex { write_kv(w, b"texture", &x.0); } Ok(()) @@ -108,7 +108,7 @@ impl Part { b"fragment_shader_data" => s.fragment_shader_data = Some(slice_to_res(&v)?), b"vertex_shader" => s.vertex_shader = Some(slice_to_res(&v)?), b"vertex_shader_data" => s.vertex_shader_data = Some(slice_to_res(&v)?), - b"texture" => s.texture = Some(slice_to_res(&v)?), + b"texture" => s.texture.push(slice_to_res(&v)?), _ => warn!("unknown part key"), } } |