Fix line atlas (#2908)
This commit is contained in:
@@ -558,19 +558,17 @@ void RenderLineLayer::update(gfx::ShaderRegistry& shaders,
|
||||
|
||||
// texture
|
||||
if (const auto& atlases = tile.getAtlasTextures(); atlases && atlases->icon) {
|
||||
if (!iconTweaker) {
|
||||
iconTweaker = std::make_shared<gfx::DrawableAtlasesTweaker>(
|
||||
atlases,
|
||||
std::nullopt,
|
||||
idLineImageTexture,
|
||||
/*isText*/ false,
|
||||
/*sdfIcons*/ true, // to force linear filter
|
||||
/*rotationAlignment_*/ AlignmentType::Auto,
|
||||
/*iconScaled*/ false,
|
||||
/*textSizeIsZoomConstant_*/ false);
|
||||
}
|
||||
auto iconTweaker = std::make_shared<gfx::DrawableAtlasesTweaker>(
|
||||
atlases,
|
||||
std::nullopt,
|
||||
idLineImageTexture,
|
||||
/*isText*/ false,
|
||||
/*sdfIcons*/ true, // to force linear filter
|
||||
/*rotationAlignment_*/ AlignmentType::Auto,
|
||||
/*iconScaled*/ false,
|
||||
/*textSizeIsZoomConstant_*/ false);
|
||||
|
||||
builder->addTweaker(iconTweaker);
|
||||
builder->addTweaker(std::move(iconTweaker));
|
||||
|
||||
setSegments(builder, bucket);
|
||||
|
||||
|
||||
@@ -92,8 +92,6 @@ private:
|
||||
gfx::ShaderGroupPtr lineGradientShaderGroup;
|
||||
gfx::ShaderGroupPtr lineSDFShaderGroup;
|
||||
gfx::ShaderGroupPtr linePatternShaderGroup;
|
||||
|
||||
gfx::DrawableTweakerPtr iconTweaker;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user