Type Alias veloren_voxygen::mesh::greedy::SuspendedMesh
source ยท pub type SuspendedMesh<'a, A> = dyn for<'r> FnOnce(&'r mut A, Vec2<u16>) + 'a;
Expand description
A suspended greedy mesh, with enough information to recover color data.
The reason this exists is that greedy meshing is split into two parts. First, the meshing itself needs to be performed; secondly, we generate a texture atlas. We do things in this order to avoid having to copy all the old vertices to the correct location. However, when trying to use the same texture atlas for more than one model, this approach runs into the problem that enough model information needs to be remembered to be able to generate the colors after the function returns, so we box up the actual coloring part as a continuation. When called with a final tile size and vector, the continuation will consume the color data and write it to the vector.