My current approach is to use Go and target WebGL as the lowest common denominator, but with OpenGL (and/or OpenGL ES) backends as well.
That way graphics code written once can run on OS X, Linux, Windows, browser (including iOS).
That way graphics code written once can run on OS X, Linux, Windows, browser (including iOS).
For a simple example, see https://github.com/shurcooL/play/commit/cd45204c1b2d89062255....