Can't set line width of an QSGGeometry object
-
I am trying to create a custom QML item by subclassing
QQuickItem
, but when I callQSGGeometry::setLineWidth( 4.28f );
I get a message that says"Line widths other than 1 are not supported by the graphics API"
, the width of the lines does not change and it's always around 2-3 pixelsQSGNode *TextBalloon::updatePaintNode( QSGNode *oldNode, QQuickItem::UpdatePaintNodeData *) { /// ... auto geometry = new QSGGeometry(QSGGeometry::defaultAttributes_Point2D(), 2); geometry->setDrawingMode(QSGGeometry::DrawLineStrip); geometry->setLineWidth( 4.28f ); /// ... }
-
I am trying to create a custom QML item by subclassing
QQuickItem
, but when I callQSGGeometry::setLineWidth( 4.28f );
I get a message that says"Line widths other than 1 are not supported by the graphics API"
, the width of the lines does not change and it's always around 2-3 pixelsQSGNode *TextBalloon::updatePaintNode( QSGNode *oldNode, QQuickItem::UpdatePaintNodeData *) { /// ... auto geometry = new QSGGeometry(QSGGeometry::defaultAttributes_Point2D(), 2); geometry->setDrawingMode(QSGGeometry::DrawLineStrip); geometry->setLineWidth( 4.28f ); /// ... }
-
With the DrawLines everything works well.
But setLineWidth() of geometry using DrawLineStrip propagates this width to all others using this flag! It's like the material doesn't consider the lineWidth() in this case.