Can one run the same program (unmodified) on both the "desktop" OpenGL and OpenGL ES 2.0 platforms, provided that this program only performs 2D accelerated rendering?
An average Windows desktop PC and Raspberry Pi will run the program. The GL context is obtained via the functions provided by the excellent SDL2 library. And for the drawing routines a texture atlas will be used.
It would be convenient if a program could be developed/debugged on a PC and then simply be recompiled to run on the raspberry Pi. This would be no issue if both OGL platforms were mostly compatible.
Since I'm a beginner when it comes to OpenGL, I of course started experimenting with the "hello triangle" program first.
To my big surprise this triangle program works on both the desktop and the Raspberry Pi (GLES2). Save for some #include
file differences.
Dazzled by all the different OpenGL headers - and function pointer gymnastics - now I'm not sure anymore if my desktop somehow provided GLES2 (which seems unlikely to me) or that the "desktop" OpenGL version I have is simply "compatible enough" with GLES2.
It's especially unclear to me whether GLES2 is just a stripped down version of OpenGL or completely different.
Is avoiding "advanced" or missing extensions/features enough to ensure compatibility across these platforms? Or are there more things to take into account?