Remove side effects of QGLXContext::queryDummyContext()
Task-number: QTBUG-34782 Change-Id: I411c89238b3002a118b1750af0157ccff5c78712 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>bb10
parent
038b0dae83
commit
9f75292a60
|
|
@ -431,6 +431,11 @@ void QGLXContext::queryDummyContext()
|
|||
if (skip)
|
||||
return;
|
||||
|
||||
QOpenGLContext *oldContext = QOpenGLContext::currentContext();
|
||||
QSurface *oldSurface = 0;
|
||||
if (oldContext)
|
||||
oldSurface = oldContext->surface();
|
||||
|
||||
QOffscreenSurface surface;
|
||||
surface.create();
|
||||
QOpenGLContext context;
|
||||
|
|
@ -446,6 +451,9 @@ void QGLXContext::queryDummyContext()
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (oldContext && oldSurface)
|
||||
oldContext->makeCurrent(oldSurface);
|
||||
}
|
||||
|
||||
bool QGLXContext::supportsThreading()
|
||||
|
|
|
|||
Loading…
Reference in New Issue