我们使用Python绑定中的QtWebEngine构建客户端。不幸的是,这个客户端在某些没有本机OpenGL 2.0支持的Windows系统上崩溃了(参见下面的调试)。 如果我设法用opengl = angle在windows上编译qt,或者这是一条死路吗?
我已经花了一整天的时间尝试使用msys2 / mingw64从Windows上的源代码编译qt,但是从一个陷阱陷入另一个陷阱而没有成功,并希望确保努力甚至有成功的机会......
谢谢!
P.S。:我也发布在Qt forum
qt.qpa.gl: Basic wglCreateContext gives version 1.1
qt.qpa.gl: OpenGL version too low
qt.qpa.gl: OpenGL 2.0 entry points not found
qt.qpa.gl: GPU features: QSet("disable_d3d11", "disable_d3d9", "disable_desktopgl")
qt.qpa.gl: Disabling Desktop GL: GpuDescription(vendorId=0x0, deviceId=0x0, subSysId=0x0, revision=0, driver: "vm3dum64.dll", version=7.14.1.1233, "R
DPDD Chained DD")
qt.qpa.gl: Disabling D3D11: GpuDescription(vendorId=0x0, deviceId=0x0, subSysId=0x0, revision=0, driver: "vm3dum64.dll", version=7.14.1.1233, "RDPDD
Chained DD")
qt.qpa.gl: Disabling D3D9: GpuDescription(vendorId=0x0, deviceId=0x0, subSysId=0x0, revision=0, driver: "vm3dum64.dll", version=7.14.1.1233, "RDPDD C
hained DD")
qt.qpa.gl: QWindowsOpenGLTester::supportedRenderers GpuDescription(vendorId=0x0, deviceId=0x0, subSysId=0x0, revision=0, driver: "vm3dum64.dll", versi
on=7.14.1.1233, "RDPDD Chained DD") renderer: QFlags(0x8|0x20)
qt.qpa.gl: Qt: Using EGL from libEGL
qt.qpa.gl: Qt: Using OpenGL ES 2.0 from libGLESv2
qt.qpa.gl: QWindowsEGLStaticContext::create Created EGL display 0x3d409b0 v 1 . 4
qt.qpa.gl: QWindowsIntegration::createPlatformOpenGLContext QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSiz
e 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::SwapBe
havior(DefaultSwapBehavior), swapInterval 1, profile QSurfaceFormat::OpenGLContextProfile(NoProfile))
qt.qpa.gl: QWindowsIntegration::createPlatformOpenGLContext QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSiz
e -1, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::Swap
Behavior(DefaultSwapBehavior), swapInterval 1, profile QSurfaceFormat::OpenGLContextProfile(NoProfile))
qt.qpa.gl: QWindowsIntegration::createPlatformOpenGLContext QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSiz
e 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::SwapBe
havior(DefaultSwapBehavior), swapInterval 1, profile QSurfaceFormat::OpenGLContextProfile(NoProfile))
qt.qpa.gl: QWindowsIntegration::createPlatformOpenGLContext QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSiz
e 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::SwapBe
havior(DefaultSwapBehavior), swapInterval 1, profile QSurfaceFormat::OpenGLContextProfile(NoProfile))
qt.qpa.gl: QWindowsIntegration::createPlatformOpenGLContext QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSiz
e 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::SwapBe
havior(DefaultSwapBehavior), swapInterval 1, profile QSurfaceFormat::OpenGLContextProfile(NoProfile))
QOpenGLShader::link: Failed to create D3D shaders.
Could not link shader program:
"Failed to create D3D shaders.\n"
QOpenGLShader::link: Failed to create D3D shaders.
Failed to create D3D shaders.
答案 0 :(得分:2)
不,我不认为从ANGLE支持的来源编译Qt对您的情况有帮助。在调试输出上,它的可见Qt已经回退到ANGLE(libGLESv2):
Qt: Using OpenGL ES 2.0 from libGLESv2
这个link证实了这一点,假设您正在运行Qt 5.5或更新版本的预构建二进制包:
配置-opengl动态时,既不是Qt也不是应用程序 使用qmake构建将链接到opengl32(标准桌面OpenGL) 或libGLESv2(ANGLE)库。相反,适当的库是 在运行时选择。默认情况下,Qt将确定系统是否正常 opengl32.dll提供OpenGL 2功能。如果这些存在, 使用opengl32.dll,否则将使用ANGLE库。
崩溃的原因似乎是模拟OpenGL代码(ANGLE / Direct3D)中发生故障的着色器。
QOpenGLShader::link: Failed to create D3D shaders.
为什么会发生这种情况。首先,我会将DirectX更新为最新版本。
答案 1 :(得分:1)