Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Offscreen and OpenGL
Ntis last edited by Ntis
I try to use Qt to compose an overlay in offscreen mode and display it with n existing opengl context (not Qt for this context, its gstreamer callback)
I tried multithread opengl for texture upload but read somewhere that it will be a relly pain to do like that, and my tries confirm that, I can't find a way to share the opengl context, to share texture created by gstreamer and the other one by Qt in the openg frame buffer.
I'm intending to use glmapbuffer to tells qt to render into a pixmap but that's sound not really efficient.
Have you a clue on how to do this ?!
I have a opengl context wth a texture in a particular thread (because this is a callback I can't change)
On the top of this texture I would like to add an overlay designed by Qt oin offscreen manner
is the glmapbuffer the right way and I need to render the full composition when something changes in the overlay or is it possible to tell Qt widget overlat composition to render only the part that changed directly in a texture that will be usable in the gstremer callback ?
Thanks for your advices, I'm really new to OpenGl, a little less to Qt and admit I'm little lost with all the possible manner to do that :s
(Edit: I forgot to mention I use Qt 5.3.2 on debian jessie on an embedded system, so only QGLWidget and no QOpenGLWidget)
Vincent007 last edited by
Would you mind telling what embedded system you are using?
Can you change your embedded system to update Qt version to Qt 5.6?
For offscreen, you can use QQuickRenderControl
Ntis last edited by Ntis
Sorry I juste saw your answer, mail notification was not taken into account.
I use a dragonboard with a debian jessie and qt 5.3.2. I tried to cross compile qt 5.5 but the compilation just stops without any errors ... I've tried the same way I successed on beagleboard and raspberry but have no more time spending on this compilation so I programming directly in the board -sick- with qtcreator -re sick-
I think QQuick is part of QtQuick that seems not be available on my board :(
There is no way to get paint event of an offcreeen management in Qt ?
For now what I've done :
load an ui
Render it to a QImage that has a mapped buffer to an OpenGl buffer
My problems :
copy to the buffer is long and seems not to be asynchronous I don't understand why :(
And my widget is transparent so successive render in the same buffer don't erase (fill with trasparency) the previous exposed area :(
And even if I success creating a texture I get the problem that Qt must uses it's own OpenGL context, and I have already mine (not Qt) , so texture aren't shared
I would like, either have an automatic repaint like a QApplication byt offscreen directly il OpenGL texture :D :D :D
Or at least now where the repaint should be done to manually erase to transparent (with right coordinates :s )