Search code examples
macosopenglsdl

Will SDL still officially support OSX when OSX no longer supports OpenGL?


SDL claims to officially support OSX, but XCode tells me that OpenGL is deprecated. Can I rely on using SDL (on OSX) as OSX continues to phase out its support of OpenGL?


Solution

    1. From official description, Simple DirectMedia Layer (SDL) is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D.

    At the same time, SDL doesn't provide any abstraction layer over graphics APIs for 3D rendering - it is responsibility of application itself for implementing efficient (3D) rendering using OpenGL, Direct3D or whatever.

    The question is, what your application actually needs from SDL? If it is it just a window/input management, then OpenGL support on a macOS platform is just an irrelevant detail.

    SDL2 already supports Metal and Vulkan render hints, although some posts tell that Metal hint works slower than OpenGL one (e.g. 2D rendering might be not hardware-accelerated when using Metal, but this may change in the future). The actual users of SDL may share their own experience in the other answers / comments.

    1. Apple has deprecated system OpenGL libraries within macOS platform, but OpenGL is still there and operational, including the latest macOS Big Sur release and Apple M1 GPU.

    So far, Apple has not revealed plans to actually remove OpenGL in the nearest future, and deprecation doesn't necessary mean removal - it may just mean that OpenGL support is limited and no more receives functional updates (which was obvious before official deprecation, as implementation stuck on OpenGL 4.1 for many years).

    I wouldn't worry about soon retirement of OpenGL support on macOS platform before official announcement of removal plans. In some future, OpenGL might be blacklisted within App Store submission rules, like it has been done for UIWebView.

    1. Apple's OpenGL is not the only OpenGL implementation option available on macOS - there are other projects to be considered in future. So that even if OpenGL will be actually removed as system library, it doesn't mean that existing OpenGL application could not be used.