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
pull/109/head
Jack Mott 2017-01-19 08:44:59 -06:00 committed by Ethan Lee
parent 4ec65bc5a0
commit d03071653d
1 changed files with 9 additions and 0 deletions

View File

@ -2404,6 +2404,15 @@ namespace SDL2
IntPtr pixels,
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* */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]