diff options
-rw-r--r-- | src/opengl/qgl_qpa.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/opengl/qgl_qpa.cpp b/src/opengl/qgl_qpa.cpp index 8a07b6a5ad..556463be8d 100644 --- a/src/opengl/qgl_qpa.cpp +++ b/src/opengl/qgl_qpa.cpp @@ -104,6 +104,9 @@ QSurfaceFormat QGLFormat::toSurfaceFormat(const QGLFormat &format) if (format.stencil()) retFormat.setStencilBufferSize(format.stencilBufferSize() == -1 ? 1 : format.stencilBufferSize()); retFormat.setStereo(format.stereo()); + retFormat.setMajorVersion(format.majorVersion()); + retFormat.setMinorVersion(format.minorVersion()); + retFormat.setProfile(static_cast<QSurfaceFormat::OpenGLContextProfile>(format.profile())); return retFormat; } |