OpenGL Rendering to Two QML Windows
-
In my project I've been successfully using my C++ OpenGL code to render underneath a QML UI on the same window. I'm now trying to render the same scene (models, textures) but using a different camera in a second, child window.
No matter what I try I cannot get anything to render on the child window. I've successfully retrieved the pointer to the child window, and I've connected a separate paint call for the child window. I'm also setting the correct viewport size, and calling beginExternalCommands() and endExternalCommands() before and after I finish my OpenGL calls to the child window. I've also tried recalling initializeOpenGLFunctions() for each window before their render pass believing that the OpenGL context may not be shared between parent and child. The render is still correct on my parent window, but the child shows nothing.