[Interest] OpenGL with Qt6 on Windows

Adam Light aclight at gmail.com
Thu Jul 27 18:12:44 CEST 2023


Hi all

I'm trying to get some tests of our application running on a GitHub actions
runner with Windows Server 2022 as the OS.

If I use a version of our application with Qt 5.12, the application starts
correctly. This Qt 5.12 was self-built using this configure command:

c:\qtbuild512\qt\configure -confirm-license -make-tool jom
-debug-and-release -force-debug-info -opensource -gui -widgets
-no-qml-debug -skip qt3d -skip qtwebengine -skip qtwebview -nomake examples
-nomake tests -no-sql-mysql -opengl desktop -mp -prefix
C:\qtbuild512\install\win64

If I try to run our application built with a self-built Qt 6.5, the
application won't start and exits with error code -1073740771. That error
code is:
0xc000041d (NT: 0xc000041d STATUS_FATAL_USER_CALLBACK_EXCEPTION) --
3221226525 (-1073740771)
Error message text: An unhandled exception was encountered during a user
callback.

The configure command for this self-built Qt 6.5.1 is:
..\..\qt\configure  -debug-and-release -force-debug-info -gui -widgets
 -nomake examples -nomake tests -trace etw -opengl desktop -prefix
C:\qtbuild6_5\install\win64

If I use the same application with the official Qt 6.5.1 binaries for
Windows, the application starts. If I remove just opengl32sw.dll, I get the
same error message I get when using our self-built binaries, which do not
include opengl32sw.dll.

It's pretty clear to me that the official binaries are working because they
include software rendering for OpenGL. Since the server likely does not
have hardware based OpenGL, and our application links against opengl32.lib,
it seems reasonable that the application would not start using our
self-built Qt 6.5 that is configured with -opengl desktop.

But what I don't understand is why the application runs with our Qt 5.12,
which also has "-opengl desktop" in the configure command.

FWIW our application is a widgets based application that uses QOpenGLWidget
and related classes.

Thanks for any insight you might have
Adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20230727/19f62083/attachment.htm>


More information about the Interest mailing list