Add public APIs for creating a Metal view attached to an SDL window. Add SDL_metal.h.
This commit is contained in:
parent
84cb66b8a8
commit
0ba98cae5f
25 changed files with 412 additions and 94 deletions
|
@ -193,9 +193,15 @@
|
|||
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||
#endif
|
||||
|
||||
#ifndef SDL_VIDEO_RENDER_METAL
|
||||
/* Metal only supported on 64-bit architectures with 10.11+ */
|
||||
#if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
|
||||
#define SDL_PLATFORM_SUPPORTS_METAL 1
|
||||
#else
|
||||
#define SDL_PLATFORM_SUPPORTS_METAL 0
|
||||
#endif
|
||||
|
||||
#ifndef SDL_VIDEO_RENDER_METAL
|
||||
#if SDL_PLATFORM_SUPPORTS_METAL
|
||||
#define SDL_VIDEO_RENDER_METAL 1
|
||||
#else
|
||||
#define SDL_VIDEO_RENDER_METAL 0
|
||||
|
@ -219,13 +225,22 @@
|
|||
#define SDL_VIDEO_OPENGL_GLX 1
|
||||
#endif
|
||||
|
||||
/* Enable Vulkan support */
|
||||
/* Metal/Vulkan Portability only supported on 64-bit architectures with 10.11+ */
|
||||
#if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
|
||||
/* Enable Vulkan and Metal support */
|
||||
#ifndef SDL_VIDEO_VULKAN
|
||||
#if SDL_PLATFORM_SUPPORTS_METAL
|
||||
#define SDL_VIDEO_VULKAN 1
|
||||
#else
|
||||
#define SDL_VIDEO_VULKAN 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef SDL_VIDEO_METAL
|
||||
#if SDL_PLATFORM_SUPPORTS_METAL
|
||||
#define SDL_VIDEO_METAL 1
|
||||
#else
|
||||
#define SDL_VIDEO_METAL 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Enable system power support */
|
||||
#define SDL_POWER_MACOSX 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue