summaryrefslogtreecommitdiff
path: root/engine/src/material.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2024-05-07 19:55:49 +0200
committerHampusM <hampus@hampusmat.com>2024-05-07 19:55:49 +0200
commit6c2dbb854145979662bd8c58ad999cc5a87dfe1f (patch)
tree9c0b3718eb2d56e6f1580234fdcd9d665ad8d9ba /engine/src/material.rs
parent5013c63cf727eaa94c30f2680163a9f868aafb6e (diff)
feat(engine): add material builder function adding a single texture
Diffstat (limited to 'engine/src/material.rs')
-rw-r--r--engine/src/material.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/engine/src/material.rs b/engine/src/material.rs
index 69fe970..c896084 100644
--- a/engine/src/material.rs
+++ b/engine/src/material.rs
@@ -156,6 +156,14 @@ impl Builder
}
#[must_use]
+ pub fn texture(mut self, texture: Texture) -> Self
+ {
+ self.textures.push(texture);
+
+ self
+ }
+
+ #[must_use]
pub fn shininess(mut self, shininess: f32) -> Self
{
self.shininess = shininess;