Share identical uniform buffers across drawables for background, line. (#1346)

This commit is contained in:
Tim Sylvester
2023-07-12 09:58:01 -07:00
committed by Bart Louwers
parent 3056f28756
commit 4eef2e3529
18 changed files with 158 additions and 111 deletions

View File

@@ -121,11 +121,11 @@ void SymbolLayerTweaker::execute(LayerGroupBase& layerGroup,
const auto isText = (symbolData.symbolType == SymbolType::Text);
if (isText && !textPaintBuffer) {
auto props = buildPaintUBO(true, evaluated);
const auto props = buildPaintUBO(true, evaluated);
textPaintBuffer = parameters.context.createUniformBuffer(&props, sizeof(props));
}
if (!isText && !iconPaintBuffer) {
auto props = buildPaintUBO(false, evaluated);
const auto props = buildPaintUBO(false, evaluated);
iconPaintBuffer = parameters.context.createUniformBuffer(&props, sizeof(props));
}