Currently, I have two separate windows and I want them to have their own (independent, so they could have different update frequencies) rendering threads. So far so good. However, I also want them to share an OpenGLContext so that they can access each others resources, but I can’t get this to work. I’ve tried
but to no avail. At least, OpenGLContext::getRawContext() returns different values for both, but maybe there is a better way to test this?
Ideally, I would also like to initialize my OpenGLContext during my program startup (so before it starts drawing components). Is there a way I could solve these issues by somehow creating a NativeContext during startup?
A slightly elaborated explanation of what I’m doing: The primary renderer is creating real-time images on one screen, with this rendering currently being done in OpenCL (might switch to Vulkan/Metal in the future). The secondary renderer shows the GUI with the controls and should be able to display a small thumbnail of what is rendered by the primary renderer, hence I want access to the final displayed image of the primary renderer.
Let me know if you want some more information and thanks in advance!