[core] Switch from background to foreground placement

- Background placement code now just generates static symbol buffers
 - Don't render GeometryTiles until their symbols are loaded. This is necessary for the CrossTileSymbolIndex to successfully prevent flicker.
 - SymbolInstances are transferred to SymbolBucket for use on foreground during collision detection
 - Symbols are sorted on foreground by sorting their index buffer but leaving vertex buffers intact (only works within one segment)
 - Vertical glyphs are generated at same time as horizontal glyphs. `reprojectLineLabels` chooses which one to use at render time and hides the other.
 - Icons are now always represented with a single collision box, even if they're placed along a line (this means their rotation alignment may be wrong, but the approach of representing them with multiple collision boxes wasn't very accurate either).
 - Generate vertices for new debug collision boxes and collision circles
 - Only add symbols within tile boundaries (reduces work, avoids double-draw)
 - Update symbol_projection.cpp to support line label projection calls from CollisionIndex.
This commit is contained in:
Chris Loer
2017-11-09 13:24:43 -08:00
committed by Chris Loer
parent 9a5b2fdfc3
commit c0cb210ddc
21 changed files with 696 additions and 430 deletions

View File

@@ -62,13 +62,13 @@ void Placement::placeLayer(RenderSymbolLayer& symbolLayer, const mat4& projMatri
state.matrixFor(posMatrix, renderTile.id);
matrix::multiply(posMatrix, projMatrix, posMatrix);
mat4 textLabelPlaneMatrix = getLabelPlaneMatrix(renderTile.matrix,
mat4 textLabelPlaneMatrix = getLabelPlaneMatrix(posMatrix,
layout.get<TextPitchAlignment>() == style::AlignmentType::Map,
layout.get<TextRotationAlignment>() == style::AlignmentType::Map,
state,
pixelsToTileUnits);
mat4 iconLabelPlaneMatrix = getLabelPlaneMatrix(renderTile.matrix,
mat4 iconLabelPlaneMatrix = getLabelPlaneMatrix(posMatrix,
layout.get<IconPitchAlignment>() == style::AlignmentType::Map,
layout.get<IconRotationAlignment>() == style::AlignmentType::Map,
state,