diff options
author | Andy Shaw <andy.shaw@qt.io> | 2020-09-29 10:49:32 +0200 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2020-09-30 07:40:34 +0200 |
commit | 5a4a8e4f6644bc1d1cbfb1b0c96b096d6d4a9a5a (patch) | |
tree | effbcb73d513446c4d1c2f098c76a7451af64b04 | |
parent | 010d2456d8bc02d1c8ce8e0f16f0ecd59ac08803 (diff) |
Only set the format to 1.0 if it was not changed due to OpenGL
Since the userRequestedApi variable can be set when a second
Qt3DWindow is created (since the environment variable is set after
the first time). Then we should be sure to only set the format
version to 1.0 if it was not already set due to OpenGL being
used.
Pick-to: 5.15
Fixes: QTBUG-86436
Change-Id: Ib68f5f1f7f8651c1f20b66060fead7f3dcfb97e0
Reviewed-by: Mike Krus <mike.krus@kdab.com>
-rw-r--r-- | src/extras/defaults/qt3dwindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/extras/defaults/qt3dwindow.cpp b/src/extras/defaults/qt3dwindow.cpp index 56f6bd13a..ec0bcb2f0 100644 --- a/src/extras/defaults/qt3dwindow.cpp +++ b/src/extras/defaults/qt3dwindow.cpp @@ -309,7 +309,7 @@ void setupWindowSurface(QWindow *window, Qt3DRender::API api) noexcept if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGL) { format.setVersion(4, 3); format.setProfile(QSurfaceFormat::CoreProfile); - } + } else #endif if (!userRequestedApi.isEmpty()) { // This is used for RHI |