Share bucket indices (#1358)

Co-authored-by: Stefan Karschti <stefan.karschti@gmail.com>
This commit is contained in:
Tim Sylvester
2023-07-13 12:45:54 -07:00
committed by Bart Louwers
parent 996b388601
commit 7f862cd8ff
26 changed files with 159 additions and 94 deletions

View File

@@ -391,7 +391,7 @@ void RenderHeatmapLayer::update(gfx::ShaderRegistry& shaders,
if (const auto& attr = heatmapVertexAttrs.add(VertexAttribName)) {
attr->setSharedRawData(bucket.sharedVertices,
offsetof(HeatmapLayoutVertex, a1),
0,
/*vertexOffset=*/0,
sizeof(HeatmapLayoutVertex),
gfx::AttributeDataType::Short2);
}
@@ -406,7 +406,7 @@ void RenderHeatmapLayer::update(gfx::ShaderRegistry& shaders,
heatmapBuilder->setVertexAttributes(std::move(heatmapVertexAttrs));
heatmapBuilder->setRawVertices({}, vertexCount, gfx::AttributeDataType::Short2);
heatmapBuilder->setSegments(
gfx::Triangles(), bucket.triangles.vector(), bucket.segments.data(), bucket.segments.size());
gfx::Triangles(), bucket.sharedTriangles, bucket.segments.data(), bucket.segments.size());
heatmapBuilder->flush();
@@ -451,7 +451,7 @@ void RenderHeatmapLayer::update(gfx::ShaderRegistry& shaders,
if (const auto& attr = textureVertexAttrs.add(VertexAttribName)) {
attr->setSharedRawData(sharedTextureVertices,
offsetof(HeatmapLayoutVertex, a1),
0,
/*vertexOffset=*/0,
sizeof(HeatmapLayoutVertex),
gfx::AttributeDataType::Short2);
}