Added overload to SDL_RenderCopy method to allow SourceRectangle to be passed as an IntPtr. This allows developers to pass IntPtr.Zero to take advantage of internal SDL default values for null rectangles.

This commit is contained in:
Justin Skiles 2013-08-26 18:44:39 -04:00
parent 10e0d51f85
commit 796e0b9e54

View file

@ -1247,6 +1247,15 @@ namespace SDL2
ref SDL_Rect dstrect ref SDL_Rect dstrect
); );
/* renderer refers to an SDL_Renderer*, texture to an SDL_Texture* */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_RenderCopy(
IntPtr renderer,
IntPtr texture,
IntPtr srcrect,
ref SDL_Rect dstrect
);
/* renderer refers to an SDL_Renderer*, texture to an SDL_Texture* */ /* renderer refers to an SDL_Renderer*, texture to an SDL_Texture* */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_RenderCopyEx( public static extern int SDL_RenderCopyEx(