namespace AcDream.App.Rendering.Wb; /// /// Starts CPU mesh extraction after the completed EnvCell build has been /// published and its geometry ids have acquired render ownership. This order /// lets ObjectMeshManager cancel queued work as soon as a landblock leaves the /// current streaming generation; stale portal destinations never keep decoder /// jobs or surface lists alive. /// public static class EnvCellMeshPreparationScheduler { public static void Schedule( EnvCellLandblockBuild build, ObjectMeshManager meshManager) { var scheduled = new HashSet(); foreach (var shell in build.Shells) { if (!scheduled.Add(shell.GeometryId)) continue; _ = meshManager.PrepareEnvCellGeomMeshDataAsync( shell.GeometryId, shell.EnvironmentId, shell.CellStructure, new List(shell.Surfaces)); } } }