explanation added

This commit is contained in:
Uwe Rathmann 2023-01-24 19:47:37 +01:00
parent c384fd608d
commit bd25e8ae23
1 changed files with 8 additions and 0 deletions

View File

@ -122,6 +122,14 @@ void QskShapeNode::updateNode( const QPainterPath& path,
const auto color = gradient.startColor().toRgb(); 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() ); auto mat = static_cast< QSGFlatColorMaterial* >( material() );
if ( mat->color() != color ) if ( mat->color() != color )
{ {