diff options
Diffstat (limited to 'engine/src/renderer/mod.rs')
-rw-r--r-- | engine/src/renderer/mod.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/engine/src/renderer/mod.rs b/engine/src/renderer/mod.rs index 3052969..afed816 100644 --- a/engine/src/renderer/mod.rs +++ b/engine/src/renderer/mod.rs @@ -340,16 +340,14 @@ fn apply_light( { gl_shader_program.set_uniform_vec_3fv( cstr!("light.position"), - &light_source.map_or_else(Vec3::default, |light_source| { - light_source.position().clone() - }), + &light_source.map_or_else(Vec3::default, |light_source| light_source.position), ); gl_shader_program.set_uniform_vec_3fv( cstr!("light.ambient"), &light_source .map_or(Color::WHITE_F32, |light_source| { - light_source.ambient().clone() + light_source.ambient.clone() }) .into(), ); @@ -358,7 +356,7 @@ fn apply_light( cstr!("light.diffuse"), &light_source .map_or(Color::WHITE_F32, |light_source| { - light_source.diffuse().clone() + light_source.diffuse.clone() }) .into(), ); @@ -367,7 +365,7 @@ fn apply_light( cstr!("light.specular"), &light_source .map_or(Color::WHITE_F32, |light_source| { - light_source.specular().clone() + light_source.specular.clone() }) .into(), ); |