diff options
author | HampusM <hampus@hampusmat.com> | 2025-01-05 22:10:00 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2025-01-05 22:10:00 +0100 |
commit | 23c49a0f5c908d9b2476c408f30b37118cd8e28f (patch) | |
tree | f17ff7000cb37c37ae3ebad640011d42c74659c5 /engine/src | |
parent | a44e663eb6d4aaf567dd35f2676014ba5aaa9e00 (diff) |
chore(engine): make query component tuple type elems references
Diffstat (limited to 'engine/src')
-rw-r--r-- | engine/src/camera/fly.rs | 2 | ||||
-rw-r--r-- | engine/src/renderer/opengl.rs | 24 |
2 files changed, 13 insertions, 13 deletions
diff --git a/engine/src/camera/fly.rs b/engine/src/camera/fly.rs index b71f875..087f727 100644 --- a/engine/src/camera/fly.rs +++ b/engine/src/camera/fly.rs @@ -75,7 +75,7 @@ pub struct Options } fn update( - camera_query: Query<(Camera, Position, Fly, ActiveCamera)>, + camera_query: Query<(&mut Camera, &mut Position, &mut Fly, &ActiveCamera)>, keys: Single<Keys>, cursor: Single<Cursor>, cursor_flags: Single<CursorFlags>, diff --git a/engine/src/renderer/opengl.rs b/engine/src/renderer/opengl.rs index 236465d..a41f61a 100644 --- a/engine/src/renderer/opengl.rs +++ b/engine/src/renderer/opengl.rs @@ -69,14 +69,14 @@ use crate::vector::{Vec2, Vec3}; use crate::vertex::{AttributeComponentType, Vertex}; use crate::window::Window; -type RenderableEntity = ( - Mesh, - Material, - Option<MaterialFlags>, - Option<Position>, - Option<Scale>, - Option<DrawFlags>, - Option<GlObjects>, +type RenderableEntity<'a> = ( + &'a Mesh, + &'a Material, + &'a Option<MaterialFlags>, + &'a Option<Position>, + &'a Option<Scale>, + &'a Option<DrawFlags>, + &'a Option<GlObjects>, ); #[derive(Debug, Default)] @@ -133,10 +133,10 @@ fn initialize(window: Single<Window>) #[allow(clippy::too_many_arguments)] fn render( - query: Query<RenderableEntity, Not<With<NoDraw>>>, - point_light_query: Query<(PointLight,)>, - directional_lights: Query<(DirectionalLight,)>, - camera_query: Query<(Camera, Position, ActiveCamera)>, + query: Query<RenderableEntity<'_>, Not<With<NoDraw>>>, + point_light_query: Query<(&PointLight,)>, + directional_lights: Query<(&DirectionalLight,)>, + camera_query: Query<(&Camera, &Position, &ActiveCamera)>, window: Single<Window>, global_light: Single<GlobalLight>, mut gl_objects: Local<GlobalGlObjects>, |