[Interest] QSGGeometryNode painting with two different colours
Gunnar Sletta
gunnar at sletta.org
Tue Oct 21 04:54:43 CEST 2014
On 20 Oct 2014, at 23:16, Nuno Santos <nunosantos at imaginando.pt> wrote:
> Hi,
>
> I’m using scene graph to render to make a sequencing matrix.
>
> I have extended QQuickItem for the main class and i’m making several nodes for the various parts that compose the matrix.
>
> One of the parts, that I was intending to put on a single node is the keyboard keys which are black and white.
>
> The question is: can I use two different colours on the same node? The other nodes are being used with the supposition that only one color is allowed per node. IS this supposition right?
Geometry nodes can be whatever you desire :)
It all depends on what data you put into your geometry and what kind of material it is using. If you want to have multiple colors in the same geometry, you can for instance use GL_TRIANGLE and QSGGeometry::defaultAttributes_ColoredPoint2D() and a QSGVertexColorMaterial.
cheers,
Gunnar
>
> Thanks,
>
> Regards,
>
> Nuno
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
More information about the Interest
mailing list