Hi, Il 17/06/2015 17:54, Marc Gilleron ha scritto:
Our context is created in a custom way, nothing to do with Qt in the first place. We made a test with a QML window and another non-Qt window where we used to render OpenGL, and it doesn't works because of resource clashes. So we need to share.Is there a way to do this with Qt by setting the |Qt::AA_ShareOpenGLContexts |flag? I didn't found any global context to call share on it in the public API...
I've added a getter for that global context in 5.5:
http://doc-snapshots.qt.io/qt5-5.5/qopenglcontext.html#globalShareContext
If you peek at the implementation you can actually also grab it on <= 5.4 by using some private APIs.
Note: I know there are canonical ways to draw OpenGL stuff in Qt, however, none of them currently suits our needs in terms of existing codebase and time. We want to be able to draw from our own loop, in our own surface, which is neither inside a paintGL()/Qt call, nor in another thread.
Now from your email I'm not 100% sure of what you need to achieve. Do you want to draw QML content on top of some other OpenGL content, and do that in a non-Qt window / GL context? There's QQuickRenderControl for that.
Hope this helps, -- Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Software Engineer KDAB (UK) Ltd., a KDAB Group company | Tel: UK +44-1625-809908 KDAB - The Qt Experts
smime.p7s
Description: Firma crittografica S/MIME
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest