render: extract static M2 batch materializer

This commit is contained in:
2026-07-18 02:00:55 +04:00
parent 0fd052923d
commit 252927d90c
12 changed files with 593 additions and 31 deletions
+5 -3
View File
@@ -36,7 +36,7 @@ flowchart LR
IO --> Extract[M2MeshResourceExtractor]
Extract --> Prepare[M2RuntimeMeshFinalizer]
Prepare --> Cache
Loader --> Build[M2 MultiMesh materialization]
Loader --> Build[M2StaticBatchMaterializer]
```
The cache may retain `Mesh` resources and copied normalized-path Strings. It has
@@ -118,7 +118,8 @@ flowchart TB
Loader[StreamingWorldLoader] --> Cache[M2MeshResourceCacheState]
Loader --> Pipeline[M2MeshLoadPipelineState]
Loader --> Finalizer[M2RuntimeMeshFinalizer]
Loader --> Builder[M2Builder and MultiMesh]
Loader --> Builder[M2Builder]
Loader --> Materializer[M2StaticBatchMaterializer]
Cache --> Mesh[Godot Mesh Resource]
Cache -. no dependency .-> Pipeline
Cache -. no dependency .-> Classifier
@@ -132,7 +133,8 @@ flowchart TB
- Borrowed Mesh lookups do not transfer ownership or duplicate resources.
- `M2MeshResourceExtractor` owns first-Mesh selection and temporary PackedScene
instances. `M2PrototypeCacheState` owns missing/prototype/animated state; the
loader owns MultiMeshes and adoption decisions.
static materializer owns MultiMesh construction/attachment; the loader owns
resource adoption and build-job decisions.
- The loader drains asynchronous work before the final cache clear.
## Errors, cancellation and recovery