Please note that this doesn't address the whole rigamarole around creating a releasable binary for macOS suitable for public consumption with code signing and such, this was just me scratching my own itch. 😄
When using SDL on macOS, there's no need to link against OpenGL because SDL as installed by Homebrew already brings in the OpenGL framework, and -lGL does not work on that platform anyway.
Also on macOS, the SDL window resize event returns the window size in points which on high-DPI screens is 2x the number of pixels. Using SDL_GL_GetDrawableSize returns the actual pixel size of the window.
Please note that this doesn't address the whole rigamarole around creating a releasable binary for macOS suitable for public consumption with code signing and such, this was just me scratching my own itch. 😄
When using SDL on macOS, there's no need to link against OpenGL because SDL as installed by Homebrew already brings in the OpenGL framework, and -lGL does not work on that platform anyway.
Also on macOS, the SDL window resize event returns the window size in points which on high-DPI screens is 2x the number of pixels. Using SDL_GL_GetDrawableSize returns the actual pixel size of the window.