mirror of
https://github.com/bevyengine/bevy
synced 2024-11-24 21:53:07 +00:00
reset uniform count on each update (oops)
This commit is contained in:
parent
ca563ea1b3
commit
22be0b3366
2 changed files with 10 additions and 9 deletions
|
@ -27,14 +27,14 @@ fn setup(world: &mut World) {
|
|||
translation: Translation::new(0.0, 0.0, 0.0),
|
||||
..Default::default()
|
||||
})
|
||||
// .add_archetype(MeshEntity {
|
||||
// mesh: cube_handle,
|
||||
// material: StandardMaterial {
|
||||
// albedo: Vec4::new(1.0, 0.0, 0.0, 1.0).into(),
|
||||
// },
|
||||
// translation: Translation::new(2.0, 0.0, 0.0),
|
||||
// ..Default::default()
|
||||
// })
|
||||
.add_archetype(MeshEntity {
|
||||
mesh: cube_handle,
|
||||
material: StandardMaterial {
|
||||
albedo: Vec4::new(1.0, 0.0, 0.0, 1.0).into(),
|
||||
},
|
||||
translation: Translation::new(2.0, 0.0, 0.0),
|
||||
..Default::default()
|
||||
})
|
||||
// light
|
||||
.add_archetype(LightEntity {
|
||||
translation: Translation::new(4.0, -4.0, 5.0),
|
||||
|
|
|
@ -44,11 +44,12 @@ where
|
|||
// (2) if we create new buffers, the old bind groups will be invalid
|
||||
|
||||
// reset all uniform buffer info counts
|
||||
for (_name, (resource, _count, entities)) in self.uniform_buffer_info_resources.iter() {
|
||||
for (_name, (resource, count, _entities)) in self.uniform_buffer_info_resources.iter_mut() {
|
||||
renderer
|
||||
.get_dynamic_uniform_buffer_info_mut(resource.unwrap())
|
||||
.unwrap()
|
||||
.count = 0;
|
||||
*count = 0;
|
||||
}
|
||||
|
||||
for (entity, (uniforms, _renderable)) in query.iter_entities(world) {
|
||||
|
|
Loading…
Reference in a new issue