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 {
|
||||
format.setAlphaBufferSize(8);
|
||||
}
|
||||
auto tester = QOpenGLWidget(widget);
|
||||
tester.setFormat(format);
|
||||
|
||||
CrashCheckStart();
|
||||
auto tester = QOpenGLWidget(widget);
|
||||
tester.setFormat(format);
|
||||
tester.grabFramebuffer(); // Force initialize().
|
||||
CrashCheckFinish();
|
||||
|
||||
if (!tester.window()->windowHandle()) {
|
||||
tester.window()->createWinId();
|
||||
}
|
||||
CrashCheckFinish();
|
||||
|
||||
const auto context = tester.context();
|
||||
if (!context
|
||||
|| !context->isValid()/*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue