summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2024-05-12 13:06:35 +0200
committerHampusM <hampus@hampusmat.com>2024-05-12 13:06:35 +0200
commitf4431eee3680a5d4b8c5dc569d70c231b3a2fc1d (patch)
treefdddb49b458f7600e61bc7354e26f0459fbf4765 /src/main.rs
parent88ce3ed506277c881d9ef2a898ec9862f2a7b243 (diff)
fix: set material colors
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 8efbf6b..8f01cd2 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -3,6 +3,7 @@ use std::path::Path;
use engine::camera::fly::{Extension as FlyCameraExtension, Options as FlyCameraOptions};
use engine::camera::Camera;
+use engine::color::Color;
use engine::data_types::dimens::Dimens;
use engine::ecs::sole::Single;
use engine::event::Start as StartEvent;
@@ -49,6 +50,9 @@ fn main() -> Result<(), Box<dyn Error>>
create_cube_mesh(cube_vertex_builder_cb),
MaterialBuilder::new()
.textures([texture])
+ .diffuse(Color::WHITE_F32)
+ .ambient(Color::WHITE_F32)
+ .specular(Color::WHITE_F32)
.ambient_map(texture_id)
.diffuse_map(texture_id)
.specular_map(texture_id)
@@ -70,6 +74,9 @@ fn main() -> Result<(), Box<dyn Error>>
create_cube_mesh(cube_vertex_builder_cb),
MaterialBuilder::new()
.textures([light_source_texture])
+ .diffuse(Color::WHITE_F32)
+ .ambient(Color::WHITE_F32)
+ .specular(Color::WHITE_F32)
.ambient_map(light_source_texture_id)
.diffuse_map(light_source_texture_id)
.specular_map(light_source_texture_id)