summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2024-05-05 21:29:49 +0200
committerHampusM <hampus@hampusmat.com>2024-05-05 21:29:49 +0200
commit81bba9fb007333c54006be9172e090c38c45d110 (patch)
tree8c68e676e42a607471ab9a10632058b0205925b8
parentc9d5bbfe490aa4aab0e9de02b67bf8fee6dca5a2 (diff)
chore: move textures to inside of Material
-rw-r--r--src/main.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index 2b2afac..8efbf6b 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -11,7 +11,7 @@ use engine::lighting::LightSource;
use engine::material::Builder as MaterialBuilder;
use engine::renderer::Extension as RendererExtension;
use engine::shader::Program as ShaderProgram;
-use engine::texture::{List as TextureList, Texture};
+use engine::texture::Texture;
use engine::transform::Transform;
use engine::vector::{Vec2, Vec3};
use engine::vertex::Builder as VertexBuilder;
@@ -47,8 +47,8 @@ fn main() -> Result<(), Box<dyn Error>>
engine.spawn((
create_cube_mesh(cube_vertex_builder_cb),
- TextureList::from_iter([texture]),
MaterialBuilder::new()
+ .textures([texture])
.ambient_map(texture_id)
.diffuse_map(texture_id)
.specular_map(texture_id)
@@ -68,8 +68,8 @@ fn main() -> Result<(), Box<dyn Error>>
..Default::default()
},
create_cube_mesh(cube_vertex_builder_cb),
- TextureList::from_iter([light_source_texture]),
MaterialBuilder::new()
+ .textures([light_source_texture])
.ambient_map(light_source_texture_id)
.diffuse_map(light_source_texture_id)
.specular_map(light_source_texture_id)