Layer::merge exists as an optimization for systems with lots of static geometry, enabling index data to be used for multiple frames without recalculation. It currently only appends data and clears the "sorted" flag, forcing a later re-sort. In the case of static geometry layers, the layer could be sorted once ahead of time and be merged with the sorted elements of another list without requiring a full resort of every item.
Layer::merge
exists as an optimization for systems with lots of static geometry, enabling index data to be used for multiple frames without recalculation. It currently only appends data and clears the "sorted" flag, forcing a later re-sort. In the case of static geometry layers, the layer could be sorted once ahead of time and be merged with the sorted elements of another list without requiring a full resort of every item.