Allow picking a Compatibility Profile for OpenGL.

This option allows picking the compatibility profile since a lot of bugs
are fixed in it. We devs will use this option to easierly debug current
problems in our Core implementation.:wq
This commit is contained in:
Fernando Sahmkow 2019-04-19 21:02:46 -04:00 committed by FernandoS27
parent 62c2404d3c
commit 788497fd9d
7 changed files with 21 additions and 1 deletions

View file

@ -377,7 +377,11 @@ void GRenderWindow::InitRenderTarget() {
// WA_DontShowOnScreen, WA_DeleteOnClose
QSurfaceFormat fmt;
fmt.setVersion(4, 3);
fmt.setProfile(QSurfaceFormat::CoreProfile);
if (Settings::values.use_compatibility_profile) {
fmt.setProfile(QSurfaceFormat::CompatibilityProfile);
} else {
fmt.setProfile(QSurfaceFormat::CoreProfile);
}
// TODO: expose a setting for buffer value (ie default/single/double/triple)
fmt.setSwapBehavior(QSurfaceFormat::DefaultSwapBehavior);
shared_context = std::make_unique<QOpenGLContext>();