The Difference and Relationship between "-opengl desktop"、"-no-angle" in Qt 5.x
-
I am tring to compile Qt myself in Windows, and I have read some materials about "what is angle project", but still have some questions.
Q1:
these compile options do not exist in Qt4. Does it mean in Qt 4, Qt GUI is rendered through DirectX?Q2:
If I compile Qt 5.x only use "-no-angle"(but not use "-opengl desktop"),is Qt GUI rendered through DirectX?Q3:
What's the difference between using "-opengl desktop" and not using "-opengl desktop"?Actually I have more questions. I just do not know how these options influnce the final compiled Qt libs.
Thanks for any help.
-
A1: If by "Qt GUI" you mean widgets then no. Not through DirectX. The widgets are rendered in software to an offscreen buffer and then blitted to the window through GDI.
A2: No. Widgets are still rendered in software and blitted with GDI. QtQuick (QML) components are rendered using OpenGL.
A3: "-opengl desktop" specifies that Qt will use the "full" OpenGL implementatin provided by your graphics driver. This is in contrast to "-opengl es2" which will use OpenGL ES2 provided by your driver (this is usually on embedded and mobile devices). If you don't specify the -opengl switch Qt will use ANGLE - which is OpenGL ES2 implementation using DirectX.
So these are basically your options:
"configure" - builds with OpenGL ES2 using ANGLE
"configure -opengl es2 -no-angle" - builds with OpenGL ES2 provided by the driver
"configure -opengl desktop" - builds with "full" OpenGL provided by the driverAlso, in Qt 5.4 there will be new switch available: "-opengl dynamic" that will build a cofiguration that can adapt to the users system at runtime i.e. if full OpenGL implementation is provided by the users driver it will use that, otherwise fall back to ANGLE.
-
Thanks for your reply.Now I know these options only affect QtQuick, not Old QtWidgets.
According to your explanation and example, I get the following conclusion. Please tell me if I am wrong:Corresponding to the "Qt Download Site"
1.Qt 5.3.2 for Android (Windows 32-bit, 817 MB) (Info)
compiled with "configure -opengl es2 -no-angle"2.Qt 5.3.2 for Windows 32-bit (VS 2013, 561 MB) (Info)
compiled with "configure"3.Qt 5.3.2 for Windows 32-bit (VS 2013, OpenGL, 559 MB) (Info)
compiled with "configure -opengl desktop"Am I right?
-
I haven't checked the actual configurations for these packages but yeah, I suppose that would be the case.
As for the widgets I wasn't entirely accurate. It actually will affect (quite obviously) QGLWidget and the new QOpenGLWidget.
Apart from Widgets and QtQuick modules the Core module also makes use of OpenGL in classes like QOpenGLFunctions and so forth, so it will be affected as well. Possibly some other modules too but I can't provide you with complete list.