cargo fmt

This commit is contained in:
Carter Anderson 2020-05-01 01:50:07 -07:00
parent 4315455859
commit 368a1b8815
5 changed files with 98 additions and 97 deletions

View File

@ -1,6 +1,10 @@
use crate::System;
use legion::prelude::Schedule;
use std::{cmp::Ordering, collections::{HashSet, HashMap}, borrow::Cow};
use std::{
borrow::Cow,
cmp::Ordering,
collections::{HashMap, HashSet},
};
#[derive(Default)]
pub struct SchedulePlan {

View File

@ -772,9 +772,7 @@ impl SystemId {
}
}
pub fn name(&self) -> Cow<'static, str> {
self.name.clone()
}
pub fn name(&self) -> Cow<'static, str> { self.name.clone() }
}
impl std::fmt::Display for SystemId {

View File

@ -11,8 +11,8 @@ pub use forward_pbr_render_graph::*;
use bevy_app::{stage, AppBuilder, AppPlugin};
use bevy_asset::AssetStorage;
use bevy_render::{render_graph::RenderGraph, shader};
use material::StandardMaterial;
use legion::prelude::IntoSystem;
use material::StandardMaterial;
#[derive(Default)]
pub struct PbrPlugin;

View File

@ -432,7 +432,10 @@ where
let mut staging_buffer_resource = None;
initialize_vertex_buffer_descriptor::<T>(&mut vertex_buffer_descriptors);
// TODO: maybe run "update" here
SystemBuilder::new(format!("uniform_resource_provider::<{}>", std::any::type_name::<T>()))
SystemBuilder::new(format!(
"uniform_resource_provider::<{}>",
std::any::type_name::<T>()
))
.read_resource::<AssetStorage<Texture>>()
.read_resource::<GlobalRenderResourceContext>()
// TODO: this write on RenderResourceAssignments will prevent this system from running in parallel with other systems that do the same
@ -512,9 +515,7 @@ where
..Default::default()
},
&mut |mut staging_buffer, _render_resources| {
for (uniforms, mut renderable) in
write_uniform_query.iter_mut(world)
{
for (uniforms, mut renderable) in write_uniform_query.iter_mut(world) {
if !renderable.is_visible {
return;
}
@ -534,10 +535,8 @@ where
},
);
uniform_buffer_arrays.copy_staging_buffer_to_final_buffers(
&mut command_queue,
staging_buffer,
);
uniform_buffer_arrays
.copy_staging_buffer_to_final_buffers(&mut command_queue, staging_buffer);
staging_buffer_resource = Some(staging_buffer);
}