I’m working on a game engine to support Emscripten, Windows desktop, and (possibly in the future) Android. I got some basics working using SDL, but I decided I want to use shaders instead and go straight to OpenGL. Since WebGL is modeled after OpenGL ES, I thought I’d program to the “ES” subset of the API even on desktop, and then I could be sure my shaders and API use would work for all platforms.
Unfortunately upon further research (and explaining why I couldn’t find one example that cross-compiles between Emscripten and desktop for using OpenGL with an SDL context), I discovered Windows never added native OpenGL ES support, and also I’d have to slightly change my shader code. I discovered the existence of the ANGLE project, but it seemed more heavyweight than I need.
So I was quite surprised when I compiled GLFW, and not only the native OpenGL example but also the OpenGL ES example both work on my Windows laptop. How is it that this is working, given that I read elsewhere that OpenGL ES doesn’t work on Windows?
Edit: by the way I’m using Msys2/MinGW64, gcc, and CMake. I downloaded the ANGLE source code, but I didn’t install it. I found online a reference to a mingw-w64-angleproject, but I can’t find that package (either installed or available) on my actual MSys2 install. So I’m confused whether GLFW is finding and using a copy of ANGLE I didn’t know I had, or if it doesn’t need ANGLE to support OpenGL ES on Windows, or if GLFW (or GLAD) is able to translate both the API and the GLSL to something else?