Hi all, first time I post here. Been developing for about 6 years in Pyqt a pretty solid media management system. So far amaizing.
I am in the process of creating a flipbook application on Pyqt (I already have one working nicely in Panda3D, but want to move to a lower level system to be able to embeed even better pyqt Widgets and file image readers)
After studing all the options, found that Qt3D has the tools I need, but as I can see the documentation is not as mature as other 3D engines.
So here the question I could not find an answer anywere:
-I need a multiprocess way of creating a texture. Understand that QPaintedTextureImage is not shareable between processes, and that QOpenGlTexture using a TextureId can be shared with qsharedgltexture in a shared context of Qt3D.
-In Python using multithread, I am successfully able to use qshredgltexture using the app attribute Qt.ApplicationAttribute.AA_ShareOpenGLContexts. With this, I create a QOpenGLTexture in a thread (in a different GL Context), and automagically I can use the TextureID in a Qt3DWindow. Yay. The problem is that Python Multithread is not really a multiprocessing system.
-The problem is that Multiprocessing in Python spawn a new Python process which is completly independent of the main process. I can create a new context in the new process and a new QOpenGlTexture, but can't find a way to get the context from Qt3DWindow to... let's say maybe use QopenGLContext.setShareContext() in the new spawn process.
This might be a limit of the PyQt implementation of QOpenGLContext, or even the memoryshare limit on python, but definetly is something that would make a difference in the use of multiprocess texture generation... Am I missing something?
Thanks in advance for your help!
Bookmarks