macOS should use OpenGL 3 or 4 instead of 2.1
We want to use core mode, not compatibility mode, but this deprecates some features like immediate mode (glBegin, glEnd). The way to initialize it is supposedly something like the following patch, but I can't get it to work yet. Also, we will have to take care to not use any other deprecated OpenGL functions.
: pixel-format-attributes>int-array ( attrs perm table -- arr )
swapd '[ _ at ] map sift concat append
! 0 happens to work as a sentinel value for all ui backends.
+ ! NSOpenGLPFAOpenGLProfile NSOpenGLProfileVersion3_2Core 2array prepend
You should probably put that code in M\ cocoa-ui-backend (make-pixel-format).
Related to #1868
But if we do that, don't we have to drop support for older OSes which do not have recent versions of opengl?
https://developer.apple.com/opengl/OpenGL-Capabilities-Tables.pdf
Windows still only comes with an OpenGL 1.1 implementation unless your graphics driver provides an ICD. You all might want to look into using ANGLE or some other portable OpenGL implementation that sits on top of the native graphics APIs on each platform.