[core] Use a separate atlas and store for annotation sprites
Fixes #1488
This commit is contained in:
committed by
John Firebaugh
parent
58886842bc
commit
e1091db45e
@@ -192,7 +192,8 @@ void Painter::renderSymbol(SymbolBucket& bucket, const SymbolLayer& layer, const
|
||||
const float fontSize = properties.icon.size;
|
||||
const float fontScale = fontSize / 1.0f;
|
||||
|
||||
spriteAtlas->bind(state.isChanging() || layout.placement == PlacementType::Line
|
||||
SpriteAtlas* activeSpriteAtlas = layer.spriteAtlas;
|
||||
activeSpriteAtlas->bind(state.isChanging() || layout.placement == PlacementType::Line
|
||||
|| angleOffset != 0 || fontScale != 1 || sdf || state.getPitch() != 0);
|
||||
|
||||
if (sdf) {
|
||||
@@ -202,7 +203,7 @@ void Painter::renderSymbol(SymbolBucket& bucket, const SymbolLayer& layer, const
|
||||
layout.icon,
|
||||
properties.icon,
|
||||
1.0f,
|
||||
{{ float(spriteAtlas->getWidth()) / 4.0f, float(spriteAtlas->getHeight()) / 4.0f }},
|
||||
{{ float(activeSpriteAtlas->getWidth()) / 4.0f, float(activeSpriteAtlas->getHeight()) / 4.0f }},
|
||||
*sdfIconShader,
|
||||
&SymbolBucket::drawIcons);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user