mirror of
https://github.com/Ryujinx/SDL2-CS.git
synced 2024-12-23 05:15:28 +00:00
Merge pull request #33 from babelshift/RenderCopyOverload
Issue #32: Added overload for SDL_RenderCopy method
This commit is contained in:
commit
eaf552bad0
38
src/SDL2.cs
38
src/SDL2.cs
|
@ -1246,7 +1246,43 @@ namespace SDL2
|
|||
ref SDL_Rect 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 source rectangle */
|
||||
[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* */
|
||||
/* 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* */
|
||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int SDL_RenderCopyEx(
|
||||
|
|
Loading…
Reference in a new issue