Closed captainmpc closed 6 years ago
We are not using OpenGL for the node graph drawing anyway. One would have to make a wrapper around QGraphicsPixmapItem to have textured text
Perhaps the best we could do is port the node graph to OpenGL which would give much more flexibility and also better zooming functionalities
Port in 2.0 or 2.1 milestone?
More like 2.1 or 2.2, this is not blocking.
It is not decided whether it's going to be ported to QWidget or QGlWidget because font rendering is going to be really bad with QGLWidget
There is no proof yet that this is a problem with QGraphicsWidget
"By default, QGraphicsView provides a regular QWidget for the viewport widget. You can access this widget by calling viewport(), or you can replace it by calling setViewport(). To render using OpenGL, simply call setViewport(new QGLWidget). QGraphicsView takes ownership of the viewport widget."
Note that the nodegraph can also be rendered using OpenGL by adding "-graphicssystem opengl" to the command-line options (e.g. /Applications/Natron.app/Contents/MacOS/Natron -graphicssystem opengl
on the Mac).
You will notice many rendering bugs, which may be due to a mis-use of the QGraphicsView API.
QGraphicsView itself may also be optimized by using simpler graphics primitives and other tricks:
Hum you should envisage to use Vulkan instead of openGL because it will twice the performance and will be massively supported. And be released this month :D
This issue was moved to NatronGitHub/Natron#108
I notice, node graph ( on OSX at least ) come to be very slow to navigate. Few nodes slowdown the graph.
I notice the first level of zoom which doesnt show node text label, is more fast to be drawn.
I think text is too " beautiful " : it seems to be generated each time the graph is navigated. and We dont need to zoom graph at this level
Should it be rasterized in texture at a fairly nice dpi but not to much, one time only and limit zoom level?
Here nuke graph at max level. Notice the aliased text