OpenGL: Enable Debug Context and Synchronous debugging when graphics debugging is enabled.

This commit aims to help easing debugging of driver crashes without
having to modify existing code.
This commit is contained in:
Fernando Sahmkow 2020-05-17 21:24:44 -04:00
commit b9eff4d004

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);