Our existing 3D software is interested in benefit of OpenGL Juce component drawing capability,
for extra editor in secondary tool window.
Main output was the first created GL thread/window and must stay managed by non Juce code.
For this, it can be interesting to share display-list of OpenGL context created by third party code with Juce ones.
I understand that Juce native context is created asynchronously so there is no possible accessor like:
(Inspired from ComponentPeer::getNativeHandle() with HWND on Win32)
By the way, in addition of existing method.
It should be possible to add new
(nativeContextToShareWith hide a HGLRC on Win32)
Win32 implementation of OpenGLContext::NativeContext could manage it like this :
// existing sharing with juce based OpenGL context: if (contextToShareWith != nullptr) wglShareLists (contextToShareWith->renderContext, renderContext); // new sharing with native third party OpenGL context: if (nativeContextHandleToShareWith) wglShareLists ((HGLRC)nativeContextHandleToShareWith, renderContext);
I suppose that similar implementation could be written for other OS.
Do you think this feature could be integrated in further Juce release ?
Thank you in advance for your attention to this matter.