Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

[SOLVED] Creating a QQuickView with a shared opengl context.

$
0
0
It’s not really an elegant solution but i think i found one. Before setting QML file, (setSource) connect a slot to QQuickWindow::sceneGraphInitialized() signal like this : connect(this, SIGNAL(sceneGraphInitialized()), this, SLOT(onSceneGraphInitialized()), Qt::DirectConnection); when it hits the slot, do following :   openglContext()->blockSignals(true);   openglContext()->doneCurrent();   openglContext()->setShareContext(openGLContextToBeSharedWith);   openglContext()->setFormat(requestedFormat());   openglContext()->create();   openglContext()->makeCurrent(this);

Viewing all articles
Browse latest Browse all 4972

Trending Articles