How is it that the GLFW OpenGL ES example works on Windows? (I thought Windows didn't natively support OpenGL ES.)

OpenGL context is created with WGL Windows API, and WGL has extension to create GLES capable context: https://registry.khronos.org/OpenGL/extensions/EXT/WGL_EXT_create_context_es2_profile.txt

Whether your GPU supports it or not depends on your GPU driver, not all of them do. You can see list of drivers/GPU’s that support or not support here: OpenGL Hardware Database by Sascha Willems (search for extension name). SDL knows how to use this extension.

if this GL extension is not supported, you can use ANGLE - as I believe that will work on any D3D11 capable GPU/driver (or older version on D3D9). If you want to use ANGLE with mingw-w64-angleproject package in msys2, then you need to install it with pacman: pacman -S mingw-w64-angleproject Then run .exe from msys2 terminal (so mingw dll files are in PATH). Otherwise you can build ANGLE project yourself, or use build that somebody else did. For example, I have ANGLE builds available on my github: https://github.com/mmozeiko/build-angle (download .zip file from Releases).

1 Like