In recent releases SDL2's CMake build produces pkg-config files for us, which will enable the GL/SDL examples to build. So this attempts to make such builds work, by:
Updating the C sources so that they will compile on Visual Studio:
_WIN32is always defined for compilers targeting Windows.
GL_CLAMP_TO_EDGEif needed, as Windows's stock
GL/gl.hmay not have supported that.
Update the Meson build files to link to
SDL2main.libon Visual Studio-like compilers, since it's required, and Meson's SDL2 support does not yet cover using CMake, so we can't use the
components:keyword in the
The code still needs some update to work under Windows, but at least the code now builds.
With blessings, thank you!