Heiko Robert
Heiko Robert

Reputation: 2707

Does Qt build with opengl=angle fix support for Windows clients not having opengl 2.0 support?

We build a client using QtWebEngine from Python bindings. Unfortunately this client crashes on some windows systems not having native OpenGL 2.0 support (see debug below). Should this work if I manage to compile qt on windows with opengl=angle or is this a dead road?

I already spent a whole day in trying compling qt from source on windows using msys2/mingw64 but fall from one trap into another without success and want to make sure the effort has even a chance of success...

Thanks!

P.S.: I also posted in the 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.

Upvotes: 2

Views: 1434

Answers (2)

Heiko Robert
Heiko Robert

Reputation: 2707

talamaki's comment put me in the right direction:

  • PyQt5 already supports the QT 5.8.x mimik by first checking for native OpenGL support and than fall back to ANGLE emulation on windows.
  • unfortunatly the errorstack gives no hint what is missing on the failing systems. After doing long, long research I found the solution for all the not working windows systems: (re) install DirectX End-User Runtimes (June 2010). It seems, Windows 7 is missing some DLLs to work with ANGLE as QT expects ...

Upvotes: 1

talamaki
talamaki

Reputation: 5472

No, I don't think compiling Qt from sources with ANGLE support helps in your case. On the debug output it's visible Qt already falls back to ANGLE (libGLESv2):

Qt: Using OpenGL ES 2.0 from libGLESv2

This link confirms it, assuming you are running pre-built binary packages of Qt 5.5 or newer:

When configured with -opengl dynamic, neither Qt nor the applications built using qmake will link to the opengl32 (standard desktop OpenGL) or libGLESv2 (ANGLE) libraries. Instead, the appropriate library is chosen at runtime. By default, Qt will determine whether the system's opengl32.dll provides OpenGL 2 functions. If these are present, opengl32.dll is used, otherwise the ANGLE libraries will be used.

The reason for crashing seems to be shader linking failure happening in emulated OpenGL code (ANGLE/Direct3D).

QOpenGLShader::link: Failed to create D3D shaders.

Why that happens is then a different story. First, I would update DirectX to a latest version.

Upvotes: 2

Related Questions