在没有硬件加速的情况下在Windows上部署Qt5 [英] Deploying Qt5 on Windows without Hardware Acceleration

查看:919
本文介绍了在没有硬件加速的情况下在Windows上部署Qt5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Qt5可以使用OpenGL驱动程序或DirectX驱动程序使用ANGLE。由于我们无法依赖安装的OpenGL驱动程序,因此我们需要使用ANGLE后端。不幸的是,这并不能解决所有的部署问题,尤其是在没有硬件加速的Windows虚拟机上。在这些系统上,我们收到一条错误消息,指出OpenGL上下文的创建失败。

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.

截图:无法为格式QSurfaceFormat创建OpenGL上下文

我们正在部署所有必需的库(libEGL.dll libGLESv2。 dll libeay32.dll msvcp110.dll msvcr110.dll d3dcompiler_46.dll),但我们仍然收到此错误消息。

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.

如何部署需要运行的QML应用程序在没有OpenGL驱动程序和没有Direct3D加速的(虚拟)机器)的最终用户机器上?

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?

Qt维基中有一个页面解决问题,但这对解决这个问题并不是很有帮助。

There is a page on the Qt wiki mentioning this problem, but that's not very helpful for solving it.

我的发现目前为止:


  • 设置QT_ANGLE_PLATFORM = warp - >创建一个没有内容的窗口。

  • Settin根据预期,g QT_ANGLE_PLATFORM = d3d9 - >同样的错误对话框。

  • 设置QT_ANGLE_PLATFORM = d3d11 - >同样的错误对话框,如预期的那样。

  • 设置QT_OPENGL = / - >同QT_ANGLE_PLATFORM = warp。

  • 设置QT_OPENGL = angle - >同样的错误对话框,如预期的那样。

  • 设置QT_OPENGL = opengl32sw.dll(Windows的台面) - >不可预测:可能运行,可能会崩溃,可能会显示错误对话框。

  • 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.

虽然,Mesa似乎是部分解决方案,但配置似乎在Qt 5.4.0中经常崩溃。

Although, Mesa seems to be a partial solution, the configration seems to be very crash often in Qt 5.4.0 .

另一个后备可能是Qt Quick 2D渲染器,但是不幸的是,这也崩溃了。

Another fallback could be the Qt Quick 2D Renderer, but unfortunately this crashes too.


  • 将softwarecontext.dll复制到/ scenegraph +设置QMLSCENE_DEVICE = softwarecontext - > crash


  • 在某些系统上有一些渲染错误

  • 在所有系统上不可靠/ li>
  • Has some render bugs on some systems
  • Does not work reliable on all systems

  • 不可靠


  • 默认实现的OpenGL 1.1太旧了

  • 即使OpenGL版本正常,也不可靠。

  • 如果使用Qt


  • 有一些主要的渲染问题

  • 崩溃,冻结

  • 适用于没有硬件加速的系统



  • 似乎相当可靠,一般来说相当慢,有些系统非常慢。

  • 重部署重量

结论:这些系统仍然没有真正的解决方案

Conclusion: there is still no real solution for these systems

Anno 2015:Broke n图形驱动器仍然损坏。

Anno 2015: Broken graphics drives are still broken.

我的结论是:


  1. 如果可能,请使用QtQuick2dRenderer。

  2. 否则使用Mesa后端。

  3. 跳过角度,跳过桌面OpenGL,跳过变形


推荐答案

QT 5在某些硬件配置上与opengl有很大的兼容性问题
组合Intel HD3000驱动程序和Nvidia / ATI卡将无法正常工作在Windows 10上。
https://bugreports.qt.io/browse/QTBUG-42240

QT 5 has huge compatibility issue with opengl on some hardware configurations Combination of Intel HD3000 driver and Nvidia/ATI card won't work on Windows 10. https://bugreports.qt.io/browse/QTBUG-42240

英特尔放弃了对这张卡的支持,但是他们的驱动程序有错误导致崩溃。

Intel drops support for this card but their drivers has bug that leads to crash.

如果您希望通过HD3000来支持客户,则不能依赖硬件opengl。

You cannot rely on hardware opengl if you want to support customers with HD3000.

这篇关于在没有硬件加速的情况下在Windows上部署Qt5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆