Added all source/destination null parameter overload variations for RenderCopy. Added function comments to explain their use. Fixed inconsistent tabbing.
This commit is contained in:
parent
796e0b9e54
commit
ad6e7a7fa8
45
src/SDL2.cs
45
src/SDL2.cs
@ -1247,15 +1247,42 @@ namespace SDL2
|
|||||||
ref SDL_Rect dstrect
|
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)]
|
/* internally, this function contains logic to use default values when source
|
||||||
public static extern int SDL_RenderCopy(
|
and destination rectangles are passed as NULL */
|
||||||
IntPtr renderer,
|
/* this overload allows for IntPtr.Zero (null) to be passed for source rectangle */
|
||||||
IntPtr texture,
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
IntPtr srcrect,
|
public static extern int SDL_RenderCopy(
|
||||||
ref SDL_Rect dstrect
|
IntPtr renderer,
|
||||||
);
|
IntPtr texture,
|
||||||
|
IntPtr srcrect,
|
||||||
|
ref SDL_Rect dstrect
|
||||||
|
);
|
||||||
|
|
||||||
|
/* renderer refers to an SDL_Renderer*, texture to an SDL_Texture* */
|
||||||
|
/* internally, this function contains logic to use default values when source
|
||||||
|
and destination rectangles are passed as NULL */
|
||||||
|
/* this overload allows for IntPtr.Zero (null) to be passed for destination rectangle */
|
||||||
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern int SDL_RenderCopy(
|
||||||
|
IntPtr renderer,
|
||||||
|
IntPtr texture,
|
||||||
|
ref SDL_Rect srcrect,
|
||||||
|
IntPtr dstrect
|
||||||
|
);
|
||||||
|
|
||||||
|
/* renderer refers to an SDL_Renderer*, texture to an SDL_Texture* */
|
||||||
|
/* internally, this function contains logic to use default values when source
|
||||||
|
and destination rectangles are passed as NULL */
|
||||||
|
/* this overload allows for IntPtr.Zero (null) to be passed for both rectangles */
|
||||||
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern int SDL_RenderCopy(
|
||||||
|
IntPtr renderer,
|
||||||
|
IntPtr texture,
|
||||||
|
IntPtr srcrect,
|
||||||
|
IntPtr 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(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user