render: Prefer the Metal renderer over OpenGL.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 19 Dec 2018 18:10:02 -0500
changeset 124821acae5590352
parent 12481 10fc11bbc967
child 12483 fbce19db4e53
render: Prefer the Metal renderer over OpenGL.

This is the best option for macOS and iOS, the only platforms with Metal.

Pre-Metal versions of these platforms will fall back to OpenGL (ES), as
appropriate.

Huge thanks to Alexander Szpakowski, who worked incredibly hard to get the
Metal renderer to such a high-quality state!
src/render/SDL_render.c
     1.1 --- a/src/render/SDL_render.c	Wed Dec 19 18:27:21 2018 -0400
     1.2 +++ b/src/render/SDL_render.c	Wed Dec 19 18:10:02 2018 -0500
     1.3 @@ -80,6 +80,9 @@
     1.4  #if SDL_VIDEO_RENDER_D3D11
     1.5      &D3D11_RenderDriver,
     1.6  #endif
     1.7 +#if SDL_VIDEO_RENDER_METAL
     1.8 +    &METAL_RenderDriver,
     1.9 +#endif
    1.10  #if SDL_VIDEO_RENDER_OGL
    1.11      &GL_RenderDriver,
    1.12  #endif
    1.13 @@ -92,9 +95,6 @@
    1.14  #if SDL_VIDEO_RENDER_DIRECTFB
    1.15      &DirectFB_RenderDriver,
    1.16  #endif
    1.17 -#if SDL_VIDEO_RENDER_METAL
    1.18 -    &METAL_RenderDriver,
    1.19 -#endif
    1.20  #if SDL_VIDEO_RENDER_PSP
    1.21      &PSP_RenderDriver,
    1.22  #endif