diff options
author | Andy Shaw <andy.shaw@qt.io> | 2020-09-29 10:49:32 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2020-09-30 07:10:50 +0000 |
commit | f256e171b4455bfdd8357623ac63c9820a35a0f3 (patch) | |
tree | f65093b2981d05d4411601430e8b10b36d8d5085 | |
parent | a44069bc8d0b09cd5b47259e0094c1eed28eb15c (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.
Fixes: QTBUG-86436
Change-Id: Ib68f5f1f7f8651c1f20b66060fead7f3dcfb97e0
Reviewed-by: Mike Krus <mike.krus@kdab.com>
(cherry picked from commit 5a4a8e4f6644bc1d1cbfb1b0c96b096d6d4a9a5a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-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 6d1ab8327..18ee6a730 100644 --- a/src/extras/defaults/qt3dwindow.cpp +++ b/src/extras/defaults/qt3dwindow.cpp @@ -302,7 +302,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 |