Drawing dashed line with QSGSimpleMaterialShader
-
As I understand there is no way to draw dashed line in Qt Quick Scene Graph so I decided to create shader material to do this.
I'm trying to apply this approach http://korkd.com/2012/02/15/dashed-lines/ to this example http://doc.qt.io/qt-5/qtquick-scenegraph-simplematerial-example.html.- How can I get ModelView matrix in my shader? I need to multiply ModelView matrix by vertex to get its current position.
- How in this example works QSGGeometry::defaultAttributes_TexturedPoint2D? What values does it store?
- How can I pass sourcePoint (the first point of a line) to my shader?
If someone knows better way to draw dashed line I would be grateful to you for telling me it.
Regards, Artem