add SDL_UpdateTexture overload

Added an overload for SDL_UpdateTexture so that you can pass a null reference, which is allowed
by the SDL2 spec. Similar pattern already exists for SDL_RenderCopy
This commit is contained in:
Jack Mott 2017-01-19 08:44:59 -06:00 committed by Ethan Lee
parent 4ec65bc5a0
commit d03071653d

View file

@ -2404,6 +2404,15 @@ namespace SDL2
IntPtr pixels, IntPtr pixels,
int pitch int pitch
); );
/* texture refers to an SDL_Texture* */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_UpdateTexture(
IntPtr texture,
IntPtr rect,
IntPtr pixels,
int pitch
);
/* renderer refers to an SDL_Renderer* */ /* renderer refers to an SDL_Renderer* */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]