From eeaf00b24a8b30591ed3d78040fded36f6f81ef1 Mon Sep 17 00:00:00 2001 From: Sean Harmer Date: Mon, 1 Oct 2012 18:28:02 +0100 Subject: [PATCH] OpenGL: Propagate version and profile from QSurfaceFormat to QGLFormat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I386ec75c429f58309527532bb160679ea51e6ccc Reviewed-by: Samuel Rødal --- src/opengl/qgl_qpa.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/opengl/qgl_qpa.cpp b/src/opengl/qgl_qpa.cpp index cc8d5736ca..594d2b18a9 100644 --- a/src/opengl/qgl_qpa.cpp +++ b/src/opengl/qgl_qpa.cpp @@ -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(format.profile())); return retFormat; }