summaryrefslogtreecommitdiff
path: root/engine/src/rendering.rs
diff options
context:
space:
mode:
Diffstat (limited to 'engine/src/rendering.rs')
-rw-r--r--engine/src/rendering.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/engine/src/rendering.rs b/engine/src/rendering.rs
index d41257c..57d9698 100644
--- a/engine/src/rendering.rs
+++ b/engine/src/rendering.rs
@@ -169,7 +169,7 @@ impl Default for GraphicsPropertiesBuilder
}
#[derive(Debug, Component)]
-pub struct SurfaceSpec
+pub struct Surface
{
pub id: SurfaceId,
}
@@ -429,7 +429,7 @@ impl Default for CommandQueue
#[tracing::instrument(skip_all)]
fn enqueue_commands_from_render_passes(
- window_surface_spec_query: Query<(&SurfaceSpec, With<Window>, With<TargetWindow>)>,
+ window_surface_query: Query<(&Surface, With<Window>, With<TargetWindow>)>,
mut command_queue: Single<CommandQueue>,
mut render_passes: Single<RenderPasses>,
mut active_draw_props: Local<ActiveDrawProperties>,
@@ -473,8 +473,8 @@ fn enqueue_commands_from_render_passes(
active_draw_props.draw_properties = last_render_pass_draw_props;
- for (window_surface_spec,) in &window_surface_spec_query {
- command_queue.push(Command::SwapBuffers(window_surface_spec.id));
+ for (window_surface,) in &window_surface_query {
+ command_queue.push(Command::SwapBuffers(window_surface.id));
}
}
@@ -495,7 +495,7 @@ fn handle_window_changed(
continue;
}
- let Some(window_surface_spec) = window_ent.get::<SurfaceSpec>() else {
+ let Some(window_surface) = window_ent.get::<Surface>() else {
continue;
};
@@ -508,13 +508,13 @@ fn handle_window_changed(
);
command_queue.queue.push_front(Command::SetSurfaceSize(
- window_surface_spec.id,
+ window_surface.id,
evt_match.get_ent_target_comp().inner_size.clone(),
));
command_queue
.queue
- .push_front(Command::MakeCurrent(window_surface_spec.id));
+ .push_front(Command::MakeCurrent(window_surface.id));
}
}
@@ -544,15 +544,15 @@ fn handle_window_removed(
"Handling removal of window"
);
- let Some(window_surface_spec) = window_ent.get::<SurfaceSpec>() else {
+ let Some(window_surface) = window_ent.get::<Surface>() else {
continue;
};
- actions.remove_comps::<(SurfaceSpec,)>(window_ent_id);
+ actions.remove_comps::<(Surface,)>(window_ent_id);
command_queue
.queue
- .push_front(Command::RemoveSurface(window_surface_spec.id));
+ .push_front(Command::RemoveSurface(window_surface.id));
}
}