[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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user