diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2019-07-16 23:18:09 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2019-07-17 09:00:57 +0200 |
commit | e0a486c77d49f4410820aa6f4139ff00d7668a7d (patch) | |
tree | 98d85080e6c24be55b3be240985169f2fb313cf5 /src/gui | |
parent | 6bd35e47080b3ddfe14543f805e744846e245c2f (diff) |
Tie QPlatformOpenGLContext to its QOpenGLContext before initializing
So that the context can be referenced during initialization.
Change-Id: I9ec69b2431ba1ac6256cb2e969a76f515497e247
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qopenglcontext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp index 9a6f879431..499d16c109 100644 --- a/src/gui/kernel/qopenglcontext.cpp +++ b/src/gui/kernel/qopenglcontext.cpp @@ -612,8 +612,8 @@ bool QOpenGLContext::create() d->platformGLContext = QGuiApplicationPrivate::platformIntegration()->createPlatformOpenGLContext(this); if (!d->platformGLContext) return false; - d->platformGLContext->initialize(); d->platformGLContext->setContext(this); + d->platformGLContext->initialize(); if (!d->platformGLContext->isSharing()) d->shareContext = 0; d->shareGroup = d->shareContext ? d->shareContext->shareGroup() : new QOpenGLContextGroup; |