Allow sharing contexts in QOpenGLTexture::destroy()
Checking for the exact same context is too strict. The texture is valid in sharing contexts too. Task-number: QTBUG-47521 Change-Id: Ifdf329ef5361b48abcb7c69e08acd7e35d624a08 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>bb10
parent
a416647e38
commit
771235285c
|
|
@ -179,8 +179,9 @@ void QOpenGLTexturePrivate::destroy()
|
|||
// not created or already destroyed
|
||||
return;
|
||||
}
|
||||
if (QOpenGLContext::currentContext() != context) {
|
||||
qWarning("Requires a valid current OpenGL context.\n"
|
||||
QOpenGLContext *currentContext = QOpenGLContext::currentContext();
|
||||
if (!currentContext || !QOpenGLContext::areSharing(currentContext, context)) {
|
||||
qWarning("Texture is not valid in the current context.\n"
|
||||
"Texture has not been destroyed");
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue