From 93acf5457b63ba6c787232c9cdf07c782e0880eb Mon Sep 17 00:00:00 2001 From: tuxuser Date: Thu, 25 Oct 2018 19:59:34 +0200 Subject: [PATCH] Add SDL_UpdateYUVTexture Add YUV specific UpdateYUVTexture function, available since SDL2 v2.0.1 (https://wiki.libsdl.org/SDL_UpdateYUVTexture) --- src/SDL2.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/SDL2.cs b/src/SDL2.cs index 6a901bd..dd67318 100644 --- a/src/SDL2.cs +++ b/src/SDL2.cs @@ -2374,6 +2374,20 @@ namespace SDL2 IntPtr pixels, int pitch ); + + /* texture refers to an SDL_Texture* */ + /* Available in 2.0.1 or higher */ + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern int SDL_UpdateYUVTexture( + IntPtr texture, + ref SDL_Rect rect, + IntPtr yPlane, + int yPitch, + IntPtr uPlane, + int uPitch, + IntPtr vPlane, + int vPitch + ); /* renderer refers to an SDL_Renderer* */ [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]