Mesh rendering is difficult!
Meshes are composed of meshlets, with one meshlet for each material in the mesh. Meshes are rendered one meshlet at a time, and meshlets should be batched by material. Meshlets with matching buffers and material should be instance-rendered. Materials should not need to be recompiled to take advantage of instanced-rendering. Meshlets need to be conditionally-excludable to support culling. Depending on the application, mesh rendering will sometimes be in the application's simulation thread, and sometimes it will not be! The vast majority of meshes instances will remain unchanged each frame, and there will be *a lot* of meshes, so an optimization to make those nearly free would be very beneficial. Meshlet batches sharing materials should be rendered in sequence to save shader-program switching time. Mesh rendering is a fundamental unit of 3D applications, and it is something I don't want to reimplement for each 3D program I build. I want to make it as self-contained as I can. NOTE...