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:
parent
8b41a29b2d
commit
eeaf00b24a
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user