Merge pull request #3958 from FernandoS27/gl-debug

OpenGL: Enable Debug Context and Synchronous debugging when graphics debugging is enabled
This commit is contained in:
bunnei 2020-05-31 17:04:27 -04:00 committed by GitHub
commit 8e9a359db5
3 changed files with 9 additions and 0 deletions

View file

@ -106,6 +106,9 @@ public:
format.setVersion(4, 3);
format.setProfile(QSurfaceFormat::CompatibilityProfile);
format.setOption(QSurfaceFormat::FormatOption::DeprecatedFunctions);
if (Settings::values.renderer_debug) {
format.setOption(QSurfaceFormat::FormatOption::DebugContext);
}
// TODO: expose a setting for buffer value (ie default/single/double/triple)
format.setSwapBehavior(QSurfaceFormat::DefaultSwapBehavior);
format.setSwapInterval(0);