Render*Rect NULL overloads

This commit is contained in:
Ethan Lee 2014-12-26 11:16:08 -05:00
parent 1313fc8b66
commit 0834d434ec

View file

@ -1941,6 +1941,15 @@ namespace SDL2
ref SDL_Rect rect
);
/* renderer refers to an SDL_Renderer*, rect to an SDL_Rect*.
* This overload allows for IntPtr.Zero (null) to be passed for rect.
*/
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_RenderDrawRect(
IntPtr renderer,
IntPtr rect
);
/* renderer refers to an SDL_Renderer* */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_RenderDrawRects(
@ -1957,6 +1966,15 @@ namespace SDL2
ref SDL_Rect rect
);
/* renderer refers to an SDL_Renderer*, rect to an SDL_Rect*.
* This overload allows for IntPtr.Zero (null) to be passed for rect.
*/
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_RenderFillRect(
IntPtr renderer,
IntPtr rect
);
/* renderer refers to an SDL_Renderer* */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_RenderFillRects(