我在 Qt 6.6 的文档里面找到一段话:
Removal of ANGLE
On Windows, ANGLE, a third-party OpenGL ES to Direct 3D translator, is no longer included in Qt 6. This means Qt::AA_UseOpenGLES and the environment variable QT_OPENGL=angle no longer has any effect. In dynamic OpenGL builds there is no automatic fallback to ANGLE in case OpenGL-proper fails to initialize. For QWindow or QWidget based applications using OpenGL directly, for example via QOpenGLWidget, this means that OpenGL-proper is the only option at runtime. However, the use of a pure software OpenGL implementation, such as Mesa llvmpipe that is shipped with the pre-built Qt packages, is still available.
For Qt Quick and Qt Quick 3D applications, Qt 6 introduces support for Direct 3D 11, Vulkan, and Metal, in addition to OpenGL. On Windows, Qt 6 defaults to Direct 3D, therefore the effect of the removal of ANGLE is lessened by the addition of support to other graphics APIs.
意思是说自从 Qt6 以后,ANGLE 就不再提供了。但是官方仍然提供软的 mesa llvmpipe opengl 渲染器。那就好,如果 Qt 的 OpenGL 模块不检测不使用软渲染器,那么在一些特殊的缺失硬件驱动的场景,OpenGL 程序就容易出问题。
【 在 missdeer 的大作中提到: 】
: 不是很懂,但是不是这样就完事了?
: #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
: // Force to use OpenGL in Qt6
: ...................
--
FROM 117.28.152.*