Get rid of QSurface::supportsOpenGL check

It checks for surface type to be compatible with OpenGL, but there's no guarantee raster surface would return true here and once it's converted to an OpenGL surface, there's no need to check as it's known to support OpenGL.

This is the case with all QWidgets in Qt 6.4.
This commit is contained in:
Ilya Fedin 2022-07-18 22:25:53 +04:00 committed by John Preston
parent ba7e3667d6
commit 48a34dc746

View file

@ -79,10 +79,6 @@ Capabilities CheckCapabilities(QWidget *widget) {
LOG(("OpenGL: Could not create window for widget."));
return {};
}
if (!widget->window()->windowHandle()->supportsOpenGL()) {
LOG_ONCE(("OpenGL: Not supported for window."));
return {};
}
format = widget->window()->windowHandle()->format();
format.setAlphaBufferSize(8);
widget->window()->windowHandle()->setFormat(format);