Yocto + X11 + OpenGLES instead of OpenGL

I need to use Open GLES2 + EGL with X11 instead of desktop OpenGL under Yocto (imx6 based board). Open GLES is supported by Vivante with their OpenGL extensions - they provide a hardware acceleration of texture assignment which is crucial for my application. Right now I just removed native JUCE OpenGL module and linked OpenGLES + EGL independently. I can create windows with standard Juce components etc. and create a separate window with OpenGLES context for rendering. The question is if it’s possible to replace OpenGL with OpenGLES and glx.h with egl.h (in fact it would be something like Android configuration) without a lot of additional work?

It’s not something we have on our immediate roadmap but we would be happy to review any pull requests. Also is there a good way to test OpenGL ES apps on a linux desktop computer (some kind of Open GL ES translation layer which converts Open GL ES back into Open GL)?

Well, I even didn’t check OpenGLES on a linux desktop computer but there are some emulators for this purpose. As I have to run OpenGLES + X11 on a target platform anyway, to use some driver specific features and merge it with Video4Linux as well, I started directly with Yocto.

I’ve already tried to play with the header files and to redirect calls from OpenGL to GLES but there are some conflicts between declarations, so first I’ll go this way: run a regular Juce GUI application + OpenGLES in a separate library. I’ll report what is possible and what I’d be able to achieve.

Great if it could be possible to have choice: Juce GUI/OpenGL working under OpenGL + X11, OpenGLES + X11, OpenGLES without X11 and direct rendering to framebuffer (maybe Wayland?) I know it’s a monumental task but would be useful for embedded solutions.

By the way, Video4Linux is really simple and easy to use, easier than I expected. Works ok with Juce applications regardless if it’s on the imx6 or on a desktop distro.