PDA

View Full Version : Multiple Meshes for a single QQuickItem subclass?



qtlearning
19th December 2013, 07:41
It appears as though QQuickItem supports one instance of QSGGeometry. I'm interested in drawing more than one thing, and in different colors, in a single QQuickItem. Is this possible? This would require more than one instance of QSGGeometry for the meshes, or at least more than one material if they were different colors.

wysota
19th December 2013, 08:04
Yes, it is possible. You can set a top level QSGNode where you will attach more than one child node.

qtlearning
19th December 2013, 08:56
Ok, so the single QQuickItem returns from updatePaintNode a single node, but that node has multiple child nodes, is that what you mean?

wysota
19th December 2013, 09:03
Yes, that's exactly what I mean.