diff options
Diffstat (limited to 'engine/src/renderer')
-rw-r--r-- | engine/src/renderer/mod.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/engine/src/renderer/mod.rs b/engine/src/renderer/mod.rs index cb7066f..5125da8 100644 --- a/engine/src/renderer/mod.rs +++ b/engine/src/renderer/mod.rs @@ -110,7 +110,12 @@ fn render( return; }; - let light_source = light_source_query.iter().next(); + // TODO: Maybe find a way to not clone here? Cloning here is needed since a light + // source transform can be in both the object query and the light source query + let light_source = light_source_query + .iter() + .next() + .map(|(light_source, transform)| (light_source.clone(), transform.clone())); let GlObjects { shader_programs: gl_shader_programs, @@ -137,7 +142,7 @@ fn render( light_source .as_ref() .map(|(light_source, light_source_transform)| { - (&**light_source, &**light_source_transform) + (light_source, light_source_transform) }), &camera, ); |