Guide to writing OpenGL and OpenGL ES compatible code?
compatibility, cross-platform, opengl, opengl-es
Solution
You may be interested in the new OpenGL ES compatibility extension ARB_ES2_compatibility (added to core in OpenGL 4.1)
Of course actually using the extension requires support for newer 4.1 desktop OpenGL but you can read through them and see what was required to get ES support on the desktop and avoid that in your ES code as much as possible. There may be some things that just aren't compatible with older desktop OpenGL versions though, mainly some shader stuff such as floating point precision.
There is also ARB_ES3_compatibility (core in OpenGL 4.3), but it's probably safe to ignore since it's for OpenGL ES 3.0).
Problem
I am familiar with the basic differences between OpenGL and OpenGL ES, e.g. no glBegin, glEnd, no quads and so forth. My question is therefore not about the differences between the two APIs but about writing code that can actually work on both APIs and their various implementations, especially regarding ES, where implementations seem to vary more. Naturally, that means conforming to features that are both present in the two APIs and identical syntax, nothing too fancy and cutting edge, with OpenGL ES 2 being the lowest common denominator.