The combination of C++ and OpenGL is really the ultimate in portability. A language supported on almost every platform by one if not more implementations (sometimes 3), coupled with probably the most widely supported graphics API. Of course you lose accessibility, and many platform API conveniences, but you get a more stable and performant platform to work with. In fact it's the platform that most web browser themselves are heavily based on. For another example just look at what Epic was able to do with Fortnite, one code base that literally runs everywhere.
Magnum [0] is a favorite of mine for creating portable OpenGL C++ applications. It also has support for compiling to WebAssembly [1] and using WebGL2.
Well, it was for a while:
https://www.anandtech.com/show/12894/apple-deprecates-opengl...