public void ProcessPendingDestruction() { _stagesForDestruction.ForEach(stage => { var id = stage.Item1; var resourcesAlreadyDestoryed = stage.Item2; var model = _renderStageCollection.Retrieve(id); if (model == null && !resourcesAlreadyDestoryed) { _frameworkMessenger.Report("Warning: Renderstage Model was expected in collection to destroy, but does not exist (is null)"); } else { model.DestroyResources(); } _renderStageCollection.Remove(id); if (_drawStagesToAutoClearDynamicQueues.Contains(id)) { _drawStagesToAutoClearDynamicQueues.Remove(id); } }); _stagesForDestruction.Clear(); }
public void ProcessPendingDestruction() { _viewportsForDestruction.ForEach(id => { _viewportCollection.Remove(id); }); _viewportsForDestruction.Clear(); }
public void ProcessPendingDestruction() { _camerasToDestroy.ForEach(id => { if (_camera2DCollection.Contains(id)) { var cam2d = _camera2DCollection.Retrieve(id); cam2d.Destroy(); _camera2DCollection.Remove(id); return; } if (_camera3DCollection.Contains(id)) { var cam3d = _camera3DCollection.Retrieve(id); cam3d.Destroy(); _camera3DCollection.Remove(id); } }); _camerasToDestroy.Clear(); }