OpenGL: Propagate version and profile from QSurfaceFormat to QGLFormat

Change-Id: I386ec75c429f58309527532bb160679ea51e6ccc
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
This commit is contained in:
Sean Harmer 2012-10-01 18:28:02 +01:00 committed by The Qt Project
parent 8b41a29b2d
commit eeaf00b24a

View File

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