From bd25e8ae23b3cbceabb8a62518d8cbd515aa6872 Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Tue, 24 Jan 2023 19:47:37 +0100 Subject: [PATCH] explanation added --- src/nodes/QskShapeNode.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/nodes/QskShapeNode.cpp b/src/nodes/QskShapeNode.cpp index 9f181d42..360dda8f 100644 --- a/src/nodes/QskShapeNode.cpp +++ b/src/nodes/QskShapeNode.cpp @@ -122,6 +122,14 @@ void QskShapeNode::updateNode( const QPainterPath& path, const auto color = gradient.startColor().toRgb(); + /* + We might want to use QSGVertexColorMaterial to improve the "batchability" + as this material does not depend on the specific colors. It could even be + batched with QskBoxNodes, that are usually using QSGVertexColorMaterial as well. + + However we would have to store the color information for each vertex. + For the moment we prefer less memory over better "batchability". + */ auto mat = static_cast< QSGFlatColorMaterial* >( material() ); if ( mat->color() != color ) {