Currently I’m trying to create some simulations within JUCE and I’m looking to improve performance using OpenCL. For this I need context sharing (in order to share buffers and prevent unnecessary copying), but how would I go about this? I already have OpenGL rendering to a component using OpenGLRenderer and an OpenGLContext, and I somehow need to pass the OpenGLContext to OpenCL. I’m on MacOS atm.
I’ve tried calling getRawContext() and casting this to NSOpenGLContext (which is what is used on MacOS internally, correct?), but I get an unknown type name-error and I don’t know what to include to solve this.
After this I plan to get a CGLContextObj from that, which I can hopefully pass to OpenCL. Does this make any sense?
Thanks in advance!