Add a warning and a return value to xcb's createGLPlatformContext
There was no value returned previously when none of GLX, EGL, DRI was enabled. Now we show a warning message and return null (resulting in a crash). Previously not returning a value resulted in obscure crashes with strange-looking call stacks, now it will be clear what the problem is. This is particularly important because not having libx11-xcb-dev installed results in silently disabled xlib support which in turn disallows the usage of glx too. The result is an obscure crash in any GL (e.g. QML2) app. Now there will be a proper warning message at least. Change-Id: I15cf3a6c16ca373d4ada7abb6d3c8f7e30c1e03d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
This commit is contained in:
parent
86ea95259d
commit
5d8d7b1dbc
@ -175,6 +175,8 @@ QPlatformOpenGLContext *QXcbIntegration::createPlatformOpenGLContext(QOpenGLCont
|
||||
#elif defined(XCB_USE_DRI2)
|
||||
return new QDri2Context(context->format(), context->shareHandle());
|
||||
#endif
|
||||
qWarning("Cannot create platform GL context, none of GLX, EGL, DRI2 is enabled");
|
||||
return 0;
|
||||
}
|
||||
|
||||
QPlatformBackingStore *QXcbIntegration::createPlatformBackingStore(QWindow *window) const
|
||||
|
Loading…
Reference in New Issue
Block a user