Qt Scene Grapg(QSG) vs OpenGL(gl function)?
-
In early Qt versions, Qt uses OpenGL as Scene Graph default back-ends. So we can easily mix both of them without problem.
Recently Qt introduces D3D and Vulkan as alternatives, they may well fit their target platform. For example D3D is usually used for Windows and X-Box platform. -
Dear @jiancaiyang ,
When developers can use opengl directly why they should use qsg instead? My main question is that what are the advantages of qsg syntax? -
Hi,
Some good reasons are explained in the first part of the Qt Quick Scene Graph. But basically one of the goodies is that it allows for optimisations to avoid useless rendering that you would otherwise have to calculate by hand thus have better performance for complexe scenes.
-
Dear @jiancaiyang,
Thank you so much but I've read that QSG can be used for complex 3D mesh,look at :
http://doc.qt.io/qt-5/qtquick-visualcanvas-scenegraph.html
It says:
"
The most important node for users is the QSGGeometryNode. It is used to define custom graphics by defining its geometry and material. The geometry is defined using QSGGeometry and describes the shape or mesh of the graphical primitive. It can be a line, a rectangle, a polygon, many disconnected rectangles, or complex 3D mesh. The material defines how the pixels in this shape are filled.
" -
I've written a blog post three years ago. You can take a view of it ( You may turn on translator ).
Here