Implement removing a light from the scene
ci/woodpecker/push/build Pipeline was successful
Details
ci/woodpecker/push/build Pipeline was successful
Details
This commit is contained in:
parent
aa79ace401
commit
da1cac1bff
|
@ -71,12 +71,17 @@ impl<U: Default + bytemuck::Pod + bytemuck::Zeroable> LightBuffer<U> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn remove_light(&mut self, queue: &wgpu::Queue, entity: edict::EntityId) {
|
||||
todo!() // TODO
|
||||
}
|
||||
/// Remove a caster from the buffer, returns true if it was removed.
|
||||
pub fn remove_light(&mut self, lights_buffer: &mut [U; MAX_LIGHT_COUNT], entity: edict::EntityId) -> bool {
|
||||
if let Some(removed_idx) = self.used_indexes.remove(&entity) {
|
||||
self.dead_indexes.push_back(removed_idx);
|
||||
self.current_count -= 1;
|
||||
lights_buffer[removed_idx] = U::default();
|
||||
|
||||
pub fn prune_dead_lights(&mut self, queue: &wgpu::Queue, entity: edict::EntityId) {
|
||||
todo!() // TODO
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue