Import: multi-mesh / multi-primitive models (submeshes + per-primitive materials)
The glTF/OBJ importer currently cooks only the first mesh's first primitive (engine/vendor/cgltf_wrap.c, engine/assets/GltfLoader.zig, and the canonical mesh cooker in editor/AssetImporter.zig). Real scenes — Sponza, Bistro, the Khronos ChronographWatch — have many meshes/primitives, each with its own material, so most geometry is silently dropped today.
Scope
- Cook all primitives of all meshes into a multi-submesh canonical mesh (extend the
TMSHformat with a submesh table: index range + material slot). - Generate/assign a material per primitive (the one-to-many manifest already supports many materials).
MeshRenderer(or a new submesh-aware path) renders each submesh with its material in both therendermodule and the software renderer.- Editor: when instantiating a model, create the submesh material bindings.
Why
Blocks importing complex models/scenes (the stated Sponza/Bistro goal). Follows the import pipeline established in #16 (closed).