AssetManager now owns scene loading and single-model registration
(MeshRegistry::register_mesh appends a mesh into the shared buffers
and rebuilds them), and exposes vertex/index buffers and mesh lookups.
app.rs and RenderBatch now go through AssetManager rather than talking
to MeshRegistry directly, so material lookups can be added there later
without touching callers again.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01986QNHM1cUsnRskKvBbbuo
Meshes now track per-primitive submesh ranges (index range + source
material index) instead of one flat index range each. glTF meshes get
one submesh per primitive; OBJ meshes get a single default submesh
until .mtl loading exists. MeshRegistry rewrites these into offsets
into its shared index buffer, and the renderer issues one draw call
per submesh so each can later be bound to its own material.
Also fixes app.rs to match the current MeshRegistry API (load_scene
instead of the removed from_scene, and Option-wrapped buffers).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01986QNHM1cUsnRskKvBbbuo
Moves mesh/material loaders under src/assets/loaders, renames Mesh to
MeshHandle, and begins scaffolding the material loader. Known-broken
build state (MeshRegistry::from_scene call site and asset_manager
mesh registration are out of sync) — committed as a rollback point
before implementing submeshes.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01986QNHM1cUsnRskKvBbbuo
This loader abstracts mesh loading logic into a series of individual file handlers. Each handler is chosen based on the extension of the file to be loaded.