title: Deploying Qt5 on Windows without Hardware Acceleration
body: <p>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.</p>
  
  <p><a href="http://i.stack.imgur.com/Aym7z.png">Screenshot: Failed to create OpenGL context for format QSurfaceFormat</a></p>
  
  <p>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.</p>
  
  <p>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?</p>
  
  <p>There is a page on the Qt wiki <a href="http://qt-project.org/wiki/Qt-5-on-Windows-ANGLE-and-OpenGL">mentioning this problem</a>, but that's not very helpful for solving it.</p>
  
  <h3>Update for Qt 5.4.0:</h3>
  
  <p>My findings so far are: </p>
  
  <ul>
  <li>Setting QT_ANGLE_PLATFORM=warp -> creates a windows without content.</li>
  <li>Setting QT_ANGLE_PLATFORM=d3d9 -> same error dialog, as expected.</li>
  <li>Setting QT_ANGLE_PLATFORM=d3d11 -> same error dialog, as expected.</li>
  <li>Setting QT_OPENGL=desktop -> same as QT_ANGLE_PLATFORM=warp.</li>
  <li>Setting QT_OPENGL=angle -> same error dialog, as expected.</li>
  <li>Setting QT_OPENGL=software + <a href="http://qt-project.org/wiki/Cross-compiling-Mesa-for-Windows">opengl32sw.dll (mesa for windows)</a> -> unpredictable: May run, may crash, may show the error dialog.</li>
  </ul>
  
  <h3>Update for Qt Quick 2D Renderer</h3>
  
  <p>Although, Mesa seems to be a partial solution, the configration seems to be very crash often in Qt 5.4.0 .</p>
  
  <p>Another fallback could be the Qt Quick 2D Renderer, but unfortunately this crashes too.</p>
  
  <ul>
  <li>Copying softwarecontext.dll into /scenegraph + Setting QMLSCENE_DEVICE=softwarecontext ->  crash</li>
  </ul>
  
  <h3>Update after some user experience:</h3>
  
  Angle
  
  <ul>
  <li>Has some render bugs on some systems</li>
  <li>Does not work reliable on all systems</li>
  </ul>
  
  Angle with Warp
  
  <ul>
  <li>Not reliable</li>
  </ul>
  
  Desktop OpenGL
  
  <ul>
  <li>The default implements OpenGL 1.1, which is too old.</li>
  <li>Not reliable, even if the OpenGL version is ok.</li>
  <li>Has render bugs, if used by Qt</li>
  </ul>
  
  QtQuick2dRenderer
  
  <ul>
  <li>Has some major render issues</li>
  <li>Crashes, Freezes</li>
  <li>Works on systems without HW acceleration</li>
  </ul>
  
  Mesa OpenGL Backend
  
  <ul>
  <li>Seems to be quite reliable at the moment</li>
  <li>quite slow in general, very slow on some systems.</li>
  <li>Heavy Deployment weight</li>
  </ul>
  
  <p>Conclusion: there is still no real solution for these systems</p>
  
  <h3>Update for Qt 5.5</h3>
  
  <p>Anno 2015: Broken graphics drives are still broken.</p>
  
  <p>My conclusion for the moment is:</p>
  
  <ol>
  <li>Use QtQuick2dRenderer if possible. </li>
  <li>Use Mesa backend otherwise.</li>
  <li>Skip Angle, skip Desktop OpenGL, skip Warp.</li>
  </ol>