From f4c767259fcf0da88d399169350c36745abbe6e3 Mon Sep 17 00:00:00 2001 From: Caleb Cornett Date: Fri, 3 May 2019 14:36:17 -0400 Subject: [PATCH] Added SDL_RenderGetMetal* functions --- src/SDL2.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/SDL2.cs b/src/SDL2.cs index 29737dd..b617abb 100644 --- a/src/SDL2.cs +++ b/src/SDL2.cs @@ -2450,6 +2450,20 @@ namespace SDL2 /* IntPtr refers to an SDL_Texture*, renderer to an SDL_Renderer* */ [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern IntPtr SDL_GetRenderTarget(IntPtr renderer); + + /* renderer refers to an SDL_Renderer* */ + /* Available in 2.0.8 or higher */ + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr SDL_RenderGetMetalLayer( + IntPtr renderer + ); + + /* renderer refers to an SDL_Renderer* */ + /* Available in 2.0.8 or higher */ + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr SDL_RenderGetMetalCommandEncoder( + IntPtr renderer + ); /* renderer refers to an SDL_Renderer* */ /* Only available in 2.0.4 */