Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QSGGeometry how to draw disk points and not squared ones
EmilieG last edited by
In OpenGL I use
gl_enable(GL_POINT_SMOOTH)but I can't find anything similar in
QSGGeometry. So all my points are squared... How can I set
fcarney last edited by fcarney
Can you draw a point on the end of the line?
I don't have a setup to test this at the moment.
Also, I don't know if a point will be smooth.
EmilieG last edited by EmilieG
QSGGeometry::DrawPointsto draw points instead of lines and it's working, but the points are squares not round.
JonB last edited by
I see an old post in this forum https://forum.qt.io/topic/13099/solved-recommended-approaches-to-plotting-points-in-3d states:
Starting to get things working now, using QGLWidget and drawing circular "points" using glPointSize() and glEnable(GL_POINT_SMOOTH) functions. I found "this example":http://www.civilnet.cn/book/embedded/gui/qt4/ch08lev1sec5.html a helpful starting point.
That implies the guy was able to use
gl_enable(GL_POINT_SMOOTH)from Qt, though I don't know anything about
QSGGeometryor how they compare. Unfortunately the linked book does not exist ... :(
Ah, another post here, https://forum.qt.io/topic/30516/solved-how-can-i-draw-xor-lines-in-a-qgraphicsscene, shows
I'd better stop, as I'm afraid I have no idea whether this applies for your
fcarney last edited by
If you need points at each location you could create an QSGNode that is a texture. I did this over the weekend. There is an example in there of using QPainter to render to texture and then turn this into a node that is for textures.