fn draw_texels<D, A: AtlasData>(
    atlas_texture_data: &mut A,
    cur_size: Vec2<u16>,
    data: &mut D,
    todo_rects: Vec<(Vec3<i32>, Vec2<Vec3<u16>>, Rectangle, Vec3<i32>)>,
    draw_delta: Vec3<i32>,
    get_ao: impl FnMut(&mut D, Vec3<i32>) -> f32,
    get_light: impl FnMut(&mut D, Vec3<i32>) -> f32,
    get_glow: impl FnMut(&mut D, Vec3<i32>) -> f32,
    get_opacity: impl FnMut(&mut D, Vec3<i32>) -> bool,
    make_face_texel: impl FnMut(<A::SliceMut<'_> as Iterator>::Item, &mut D, Vec3<i32>, u8, u8, bool)
)
Expand description

We deferred actually recording the colors within the rectangles in order to generate a texture of minimal size; we now proceed to create and populate it.