Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Disambiguation: QPainter, OpenGL, "backend" and "engine"
apc99999 last edited by
In TomCooksey's Qt Lab's blog post he mentions "the OpenGL engine," he also mentions that Qt currently uses the 2.0 version of the API. The QPainter class reference mentions that developers focus on the OpenGL 2.0 (ES) backend (among others) for optimization.
What exactly is meant by engine (or backend) in this context. I understand backend to be the capabilities presented by the underlying OS/HW platform, and if the necessary libraries/drivers are present on that platform then the OpenGL rendering commands execute on the local hardware. What is all this about a Qt "engine," does Qt implement a subset of the API itself? (is that why only 2.0 (ES) is supported, even if your HW/OS is capable of 3.0), how exactly could it be optimized other then to simply be native (aren't the gl* rendering commands winding their way more or less directly to the driver and then the hardware)? And if there is an engine, why must I #include my system's OpenGL headers (or import the python modules).
Any light shed on this would help this OpenGL/Qt newbie get things straight in his head.
jorj last edited by
Qt implements its painter interface using OpenGL, which is slightly different to when you actually use the gl* commands yourself then you are talking directly to whatwever gl implementation there is on your machine.
It is possible to set up qt to use OpenGL to draw its entire interface (using the -opengl command line flag, among other methods), so when a QPainter is opened on a widget and draws lines etc, it is then itself using the Qt OpenGL API.
Hope that helps?