acdream/src/AcDream.App/Streaming
Erik 0405947bac feat(A.5 T12): inject mesh-build dependency into LandblockStreamer
Replaces the T7-temporary default! MeshData placeholder. Streamer
now takes Func<uint, LoadedLandblock?, LandblockMeshData?> at
construction; the worker calls it after _loadLandblock succeeds and
passes the pre-built mesh into LandblockStreamResult.Loaded.

GameWindow's buildMeshOrNull factory takes the already-loaded
LoadedLandblock (lb.Heightmap is the LandBlock dat object), so no
additional dat read is needed — _heightTable and _blendCtx are
read-only after init, _surfaceCache is ConcurrentDictionary (T9).
Zero dat lock needed inside the mesh-build closure.

StreamingController._applyTerrain delegate signature widened to
Action<LoadedLandblock, LandblockMeshData> so the pre-built mesh
flows render-thread-side via the Loaded result. ApplyLoadedTerrainLocked
now accepts meshData and calls _terrain.AddLandblock directly, skipping
the per-frame LandblockMesh.Build that previously ran on the render
thread (~5ms per LB at radius=12 first traversal).

StreamingControllerTests updated: all four applyTerrain lambdas
adapted to the two-arg Action signature.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 07:35:45 +02:00
..
GpuWorldState.cs phase(N.5): retirement amendment — InstancedMeshRenderer + StaticMeshRenderer + WbFoundationFlag deleted 2026-05-08 22:01:36 +02:00
LandblockStreamer.cs feat(A.5 T11): activate LandblockStreamer worker thread 2026-05-10 07:32:35 +02:00
LandblockStreamJob.cs feat(A.5 T7): LandblockStreamResult.Loaded.Tier+MeshData; Promoted variant 2026-05-09 22:53:07 +02:00
LandblockStreamTier.cs feat(A.5 T1): LandblockStreamTier + LandblockStreamJobKind enums 2026-05-09 22:15:57 +02:00
StreamingController.cs feat(A.5 T12): inject mesh-build dependency into LandblockStreamer 2026-05-10 07:35:45 +02:00
StreamingRegion.cs fix(A.5 T4-T6): bootstrap guard + dead enum + test cleanups 2026-05-09 22:49:35 +02:00
TwoTierDiff.cs feat(A.5 T2): TwoTierDiff record + LandblockStreamJob.Load.Kind 2026-05-09 22:20:48 +02:00