diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/main.rs b/src/main.rs index 8346cbf..2a4f9e1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,7 +12,7 @@ use engine::file_format::wavefront::mtl::parse as parse_mtl; use engine::file_format::wavefront::obj::parse as parse_obj; use engine::input::Extension as InputExtension; use engine::lighting::{GlobalLight, LightSource}; -use engine::material::Builder as MaterialBuilder; +use engine::material::{Builder as MaterialBuilder, Flags as MaterialFlags}; use engine::renderer::Extension as RendererExtension; use engine::shader::Program as ShaderProgram; use engine::transform::Transform; @@ -82,15 +82,12 @@ fn main() -> Result<(), Box<dyn Error>> .to_mesh()?, MaterialBuilder::new().ambient(YELLOW * 5.0).build(), ShaderProgram::new()?, + MaterialFlags::builder().use_ambient_color(true).build(), )); engine.spawn((Camera { current: true, ..Default::default() },)); - engine.add_sole( - GlobalLight::builder() - .ambient_offset(-Color::WHITE_F32) - .build(), - )?; + engine.add_sole(GlobalLight::default())?; engine.register_system(StartEvent, prepare_window); |