I have been playing around with SDL 2.0 but after searching I haven\'t found anything online about how to support retina macs. When creating a window using the following cod
Current versions of SDL2 have support for retina.
To create a retina window, pass a flag SDL_WINDOW_ALLOW_HIGHDPI
into SDL_CreateWindow()
.
After a resize event, you can check the actual buffer resolution with the API call SDL_GL_GetDrawableSize()
.
Right now, SDL doesn't support retina displays on Macs (or High-DPI displays on Windows machines).
There is discussion about how best to add these features, and a few prototype patches on SDL's bug tracker, here: https://bugzilla.libsdl.org/show_bug.cgi?id=1934
Presumably we'll see official retina support in a future release of SDL2. Or if you're willing to compile your own SDL libraries, those patches work for me.