Skip to main content

Module store

Module store 

Source
Expand description

Unified, engine-wide GPU/asset resource store.

AssetStore is the single home for every projected asset cache — Assets<GpuMesh>, Assets<GpuMaterial>, Assets<CpuTexture>, and any future type. It replaces the per-type named wrappers (GpuCache, GpuMaterialCache, CpuTextureCache) that each existed only to get a distinct TypeId in the runtime resource registry.

It is the Data side of CLAD: a store of resources projected from the ECS, consumed by the render descent. One AssetStore is created at bootstrap, registered into runtime.resources, and shared (cheap Arc clone) by the projection and every consumer. Adding a new asset type needs zero new wiring: store.store::<T>() lazily creates the typed sub-store on first access.

Structs§

AssetStore
Shared, type-erased registry of Assets<T> sub-stores keyed by TypeId.