I am experimenting with the Mapbox GL SDK, and their renderer creates its own GLES3.1 context through EGL and renders to its own FBO. I need to embed this renderer into our app which uses Desktop GL 4.6 for rendering, on desktop Linux x86_64 systems with high-end nVidia GPUs.
I am looking for ways to quickly copy (remaining on GPU) a texture (FBO color attachment) from the Mapbox GLES context to a texture of the same format in our GL 4.6 context, so that I can use it as a layer in our render.
First I tried using CUDA Graphics Interop to access both textures and do the copy, but CUDA on Linux x86_64 does not seem to support registering images from a GLES context (presumably that only works on mobile platforms like Tegra/Jetson).
I have been experimenting with EGLImage, and made some progress, but I’d like to know whether this is a viable solution, as frankly I hadn’t heard of it before today, and I fear that it, too, may be a mobile/GLES-only solution, despite what the EGL extension doc implies.
Please advise, thanks!