The OpenGL ES port of FreeGLUT is progressing
Now we have:
Basic Android/EGL port
Full X11/EGL port (using Mesa EGL), so we can test GLES on desktop
Geometry functions: upgrade from glBegin to glVertexPointer and GLES compatibility (triangulation). We also plan to provide shaders-compatible (OpenGL >= 2) geometry functions.
In addition, the work is available in the official repository! http://freeglut.svn.sourceforge.net/viewvc/freeglut/trunk/freeglut/freeglut/
Question: Mesa and Android ship GLES 1&2 in separate libraries. So at first glance, we'll have to ship 3 FreeGLUT builds:
freeglut.so / .a
freeglut-gles2.so / .a with -DFREEGLUT_GLES2 (-lGLESv2 + GLES2/gl2.h)
freeglut-gles1.so / .a with -DFREEGLUT_GLES1 (-lGLESv1_CM + GLES/gl.h)
Though, EAGL (on iPhone) can initialize either GLES 1 or 2 at run-time. Maybe it's possibly to do that by dlopen'ing the GLES library dynamically, but this won't work for static builds - and make distro packagers cringe unless I'm mistaken
Do you think there's a way to provide a unified version?
Actually it should be possible to make a unified version using only *GetProcAddress, and possibly dlopen()ing WGL or EGL at run time.
SDL2 loads OpenGL using these techniques :
Currently debating over which approach is best (multiple statically linked versions or a unified version with dynamic loading)
http://sourceforge.net/mailarchive/message.php?msg_id=29169954