mirror of
https://github.com/FyroxEngine/Fyrox.git
synced 2026-10-12 02:02:20 +00:00
remove render data for destroyed cameras
This commit is contained in:
@@ -110,6 +110,7 @@ use crate::{
|
||||
};
|
||||
use fxhash::FxHashMap;
|
||||
use fyrox_core::err;
|
||||
use fyrox_graph::BaseSceneGraph;
|
||||
use fyrox_graphics::{
|
||||
sampler::{GpuSampler, GpuSamplerDescriptor},
|
||||
sampler::{MagnificationFilter, MinificationFilter, WrapMode},
|
||||
@@ -1497,6 +1498,10 @@ impl Renderer {
|
||||
)?;
|
||||
}
|
||||
|
||||
scene_render_data
|
||||
.camera_data
|
||||
.retain(|h, _| graph.is_valid_handle(*h));
|
||||
|
||||
for (camera_handle, camera) in graph.pair_iter().filter_map(|(handle, node)| {
|
||||
if node.is_globally_enabled() {
|
||||
if let Some(camera) = node.cast::<Camera>() {
|
||||
|
||||
Reference in New Issue
Block a user