OpenGL: Propagate version and profile from QSurfaceFormat to QGLFormat
authorSean Harmer <sean.harmer@kdab.com>
Mon, 1 Oct 2012 17:28:02 +0000 (18:28 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 2 Oct 2012 08:43:48 +0000 (10:43 +0200)
Change-Id: I386ec75c429f58309527532bb160679ea51e6ccc
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
src/opengl/qgl_qpa.cpp

index cc8d573..594d2b1 100644 (file)
@@ -79,6 +79,8 @@ QGLFormat QGLFormat::fromSurfaceFormat(const QSurfaceFormat &format)
     }
     retFormat.setDoubleBuffer(format.swapBehavior() != QSurfaceFormat::SingleBuffer);
     retFormat.setStereo(format.stereo());
+    retFormat.setVersion(format.majorVersion(), format.minorVersion());
+    retFormat.setProfile(static_cast<QGLFormat::OpenGLContextProfile>(format.profile()));
     return retFormat;
 }