From cfaa43c554ef3e9d1e2ebf1cbdbbb8ce1bdcbe59 Mon Sep 17 00:00:00 2001 From: Mike Krus Date: Wed, 11 Dec 2019 17:43:27 +0000 Subject: Always get the estimate primitive count from the attribute Previously were checking that the attribute was actually but due to refactoring the shader is not yet examined at this point. With this change, we always get the estimated number of points from the attributes. Potentially it means we're getting it from an attribute that is not being used but the user should then set the correct number on the geometry renderer anyway. Task-number: QTBUG-80697 Change-Id: Ie34131fe3ff41b34609a2f2eb95c4ff678424036 Reviewed-by: Paul Lemire --- src/render/renderers/opengl/renderer/renderview.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/render/renderers/opengl') diff --git a/src/render/renderers/opengl/renderer/renderview.cpp b/src/render/renderers/opengl/renderer/renderview.cpp index 3612d8767..d7e34e16c 100644 --- a/src/render/renderers/opengl/renderer/renderview.cpp +++ b/src/render/renderers/opengl/renderer/renderview.cpp @@ -686,11 +686,9 @@ EntityRenderCommandData RenderView::buildDrawRenderCommands(const QVectornameId())) - estimatedCount = std::max(int(attribute->count()), estimatedCount); + case QAttribute::VertexAttribute: + estimatedCount = std::max(int(attribute->count()), estimatedCount); break; - } default: Q_UNREACHABLE(); break; -- cgit v1.2.3