Qt raster engine vs OpenGL in QGraphicsView
I am working on a scene/view representation of a scalable graph diagram. I am now doing performance tests with thousands of nodes and edges and I am puzzled with few things. Test with 10 000 movable nodes and 10 000 edges:
Using OpenGL instead of native raster engine is actually worse (class QOpenGLWidget). With raster I can zoom out to see everything and while it stutters it is actually not that bad. With OpenGL I can barely zoom out to see everything before it starts dying badly.
In neither OpenGL or Qt raster has antialiasing noticeable impact on performance. Which is strange because visually the difference is clearly noticeable and I would expect that with this amount of stuff being drawn I could get noticeable performance difference when disabled.
While the second point is more of a curiosity the first one seems important to me. If I understand correctly then Qt raster paint engine uses purely CPU while OpenGL should use hardware acceleration. So OpenGL should really be a lot better at this. However since it is slower/worse performance wise I would say that it is only being emulated through CPU and no graphics card is actually. Can I check that somehow from within the programme or set it? I seem not to be able to find the answer in the docs.
But of course maybe the raster IS actually better for drawing in QGraphicsView.
Things to check:
- What GPU do you have on your system ?
- OS ?
- Qt version ?
- GPU drivers ?
- Are you rendering too much objects on your scene ?