Hi,
I'm building an app with SFML and we are targeting older versions of MacOS (back to 10.10). However, using SFML to create the window crashes or hangs in MacOS 10.10.
It seems to be caused by this line:
SFContext.mm
NSOpenGLPixelFormat* pixFmt = [[NSOpenGLPixelFormat alloc] initWithAttributes:&attrs[0]];
pixFmt returns nill which causes the function to return without setting m_context, which is still uninitialized, and then other code tries to use it.
Through more investigation, I found that if I changed this line:
attrs.push_back(NSOpenGLPFAAccelerated);
to
if (@available(macOS 10.14, *))
attrs.push_back(NSOpenGLPFAAccelerated);
The window opens and draws my objects correctly on 10.10.
I don't know anything about OpenGL, but this test suggests to me that hardware acceleration for antialiasing wasn't supported in earlier versions of MacOS. Can somebody who is more familiar with OpenGL or MacOS comment? And, should this be a patch in future versions of SFML?