Make a more robust check of OpenGL init.
This commit is contained in:
parent
bfdd116000
commit
79b6cd347c
1 changed files with 4 additions and 4 deletions
|
|
@ -86,16 +86,16 @@ Capabilities CheckCapabilities(QWidget *widget) {
|
||||||
} else {
|
} else {
|
||||||
format.setAlphaBufferSize(8);
|
format.setAlphaBufferSize(8);
|
||||||
}
|
}
|
||||||
auto tester = QOpenGLWidget(widget);
|
|
||||||
tester.setFormat(format);
|
|
||||||
|
|
||||||
CrashCheckStart();
|
CrashCheckStart();
|
||||||
|
auto tester = QOpenGLWidget(widget);
|
||||||
|
tester.setFormat(format);
|
||||||
tester.grabFramebuffer(); // Force initialize().
|
tester.grabFramebuffer(); // Force initialize().
|
||||||
CrashCheckFinish();
|
|
||||||
|
|
||||||
if (!tester.window()->windowHandle()) {
|
if (!tester.window()->windowHandle()) {
|
||||||
tester.window()->createWinId();
|
tester.window()->createWinId();
|
||||||
}
|
}
|
||||||
|
CrashCheckFinish();
|
||||||
|
|
||||||
const auto context = tester.context();
|
const auto context = tester.context();
|
||||||
if (!context
|
if (!context
|
||||||
|| !context->isValid()/*
|
|| !context->isValid()/*
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue