Global UBO (#2292)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Alex Cristici
2024-04-24 17:14:18 +03:00
committed by GitHub
parent 54a07f4b9c
commit d22362ab22
115 changed files with 966 additions and 659 deletions

View File

@@ -203,11 +203,6 @@ void TileSourceRenderItem::updateDebugDrawables(DebugLayerGroupMap& debugLayerGr
const auto matrix = LayerTweaker::getTileMatrix(
tileID, parameters, {{0, 0}}, style::TranslateAnchorType::Viewport, false, false, drawable, false);
const shaders::LineDynamicUBO dynamicUBO = {
/*units_to_pixels = */ {1.0f / parameters.pixelsToGLUnits[0], 1.0f / parameters.pixelsToGLUnits[1]},
0,
0};
const shaders::LineDrawableUBO drawableUBO = {/*matrix = */ util::cast<float>(matrix),
/*ratio = */ 1.0f / tileID.pixelsToTileUnits(1.0f, zoom),
0,
@@ -222,7 +217,6 @@ void TileSourceRenderItem::updateDebugDrawables(DebugLayerGroupMap& debugLayerGr
0,
0};
auto& drawableUniforms = drawable.mutableUniformBuffers();
drawableUniforms.createOrUpdate(idLineDynamicUBO, &dynamicUBO, parameters.context);
drawableUniforms.createOrUpdate(idLineDrawableUBO, &drawableUBO, parameters.context);
drawableUniforms.createOrUpdate(idLineInterpolationUBO, &lineInterpolationUBO, parameters.context);
drawableUniforms.createOrUpdate(idLineEvaluatedPropsUBO, &linePropertiesUBO, parameters.context);