From 48a34dc7469292ba2b63084d85209d353dc97ab9 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Mon, 18 Jul 2022 22:25:53 +0400 Subject: [PATCH] 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. --- ui/gl/gl_detection.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ui/gl/gl_detection.cpp b/ui/gl/gl_detection.cpp index 7c7ea3f..91af67f 100644 --- a/ui/gl/gl_detection.cpp +++ b/ui/gl/gl_detection.cpp @@ -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);