Marc Gilleron
2015-06-17 15:54:53 UTC
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.
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.