Fix OpenGL detection on WA_NativeWindow widgets.

This commit is contained in:
John Preston 2021-06-18 22:53:44 +04:00
parent 825ef11f1a
commit bd989cb67f

View file

@ -56,8 +56,9 @@ Capabilities CheckCapabilities(QWidget *widget) {
}
const auto context = tester.context();
if (!context
|| !context->isValid()
|| !context->makeCurrent(tester.window()->windowHandle())) {
|| !context->isValid()/*
// This check doesn't work for a widget with WA_NativeWindow.
|| !context->makeCurrent(tester.window()->windowHandle())*/) {
LOG_ONCE(("OpenGL: Could not create widget in a window."));
return {};
}