summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2012-10-01 18:28:02 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-02 10:43:48 +0200
commiteeaf00b24a8b30591ed3d78040fded36f6f81ef1 (patch)
tree0f74a6b9d0ed52d284ab225fef1bae5e4b1d2229
parent8b41a29b2d90757d1efa168b342bc84c748adf46 (diff)
OpenGL: Propagate version and profile from QSurfaceFormat to QGLFormat
Change-Id: I386ec75c429f58309527532bb160679ea51e6ccc Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
-rw-r--r--src/opengl/qgl_qpa.cpp2
1 files changed, 2 insertions, 0 deletions
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<QGLFormat::OpenGLContextProfile>(format.profile()));
return retFormat;
}