Setting the OpenGL implementation for QML

We can change the graphics driver to be used without the Qt application by seating the environment variable QT_OPENGL to desktop for the native OpenGL driver, ANGLE for OpenGL emulation on DirectX, or software for the Mesa software rasterizer.

The ANGLE driver will automatically choose the underlying DirectX driver, but we can force a given version by setting the environment variable QT_ANGLE_PLATFORM to d3d9, d3d11 for the corresponding DirectX version, or WARP, for the built-in DirectX software rasterizer.

If you'd like to know why your chosen graphics driver wasn't used by Qt, you can enable the logging category qt.qpa.gl by setting QT_LOGGING_RULES=qt.qpa.gl=true to see why the specific OpenGL ...

Get Hands-On High Performance Programming with Qt 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.