Qt5 can use the OpenGL driver or the DirectX Driver by using ANGLE. As we cannot depend on an installed OpenGL driver, we need to use the ANGLE backend. Unfortunately, this doesn't solve all deployment problems especially on Windows virtual machines without hardware acceleration. On these systems, we're getting an error message saying that the creation of an OpenGL context failed.
Screenshot: Failed to create OpenGL context for format QSurfaceFormat
We're deploying all required libraries (libEGL.dll libGLESv2.dll libeay32.dll msvcp110.dll msvcr110.dll d3dcompiler_46.dll) but we're still getting this error message.
How do you deploy a QML application that needs to run on end user machines without OpenGL driver and on (virtual) machines without Direct3D Acceleration?
There is a page on the Qt wiki mentioning this problem, but that's not very helpful for solving it.
Update for Qt 5.4.0:
My findings so far are:
- Setting QT_ANGLE_PLATFORM=warp -> creates a windows without content.
- Setting QT_ANGLE_PLATFORM=d3d9 -> same error dialog, as expected.
- Setting QT_ANGLE_PLATFORM=d3d11 -> same error dialog, as expected.
- Setting QT_OPENGL=desktop -> same as QT_ANGLE_PLATFORM=warp.
- Setting QT_OPENGL=angle -> same error dialog, as expected.
- Setting QT_OPENGL=software + opengl32sw.dll (mesa for windows) -> unpredictable: May run, may crash, may show the error dialog.
Update for Qt Quick 2D Renderer
Although, Mesa seems to be a partial solution, the configration seems to be very crash often in Qt 5.4.0 .
Another fallback could be the Qt Quick 2D Renderer, but unfortunately this crashes too.
- Copying softwarecontext.dll into /scenegraph + Setting QMLSCENE_DEVICE=softwarecontext -> crash
Update after some user experience:
Angle- Has some render bugs on some systems
- Does not work reliable on all systems
- Not reliable
- The default implements OpenGL 1.1, which is too old.
- Not reliable, even if the OpenGL version is ok.
- Has render bugs, if used by Qt
- Has some major render issues
- Crashes, Freezes
- Works on systems without HW acceleration
- Seems to be quite reliable at the moment
- quite slow in general, very slow on some systems.
- Heavy Deployment weight
Conclusion: there is still no real solution for these systems
Update for Qt 5.5
Anno 2015: Broken graphics drives are still broken.
My conclusion for the moment is:
- Use QtQuick2dRenderer if possible.
- Use Mesa backend otherwise.
- Skip Angle, skip Desktop OpenGL, skip Warp.