[Interest] How to share a native OpenGL context with Qt?

Marc Gilleron marc.gilleron at gmail.com
Wed Jun 17 17:54:53 CEST 2015


Hello,

We have to integrate Qt in our application. A part of it uses OpenGL to
perform custom rendering on various platforms.

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...

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150617/aa0091dc/attachment.html>


More information about the Interest mailing list