|
⇤ ← Revision 1 as of 2009-12-10 03:36:23
Size: 1333
Comment: create page, add content
|
Size: 1473
Comment: content added
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 31: | Line 31: |
| The texture is blended with the destination based on the bland mode set with [[SDL_SetTextureBlendMode]](). | |
| Line 39: | Line 40: |
| .[[SDL_SetTextureBlendMode]] |
SDL_RenderCopy
Use this function to copy a portion of the texture to the current rendering target.
Contents
Syntax
int SDL_RenderCopy(SDL_TextureID textureID,
const SDL_Rect* srcrect,
const SDL_Rect* dstrect)
Function Parameters
textureID |
the source texture; see Remarks for details |
srcrect |
a pointer to the source rectangle, or NULL for the entire texture |
dstrect |
a pointer to the destination rectangle, or NULL for the entire rendering target |
Return Value
Returns 0 on success, or -1 if there is no rendering context current or the driver doesn't support the requested operation; call SDL_GetError() for more information.
Code Examples
You can add your code example here
Remarks
The texture is blended with the destination based on the bland mode set with SDL_SetTextureBlendMode(). The texture channel modulation is provided by the enumeration SDL_TextureModulate using these flags:
SDL_TEXTUREMODULATE_NONE |
no modulation |
SDL_TEXTUREMODULATE_COLOR |
srcC = srcC * color |
SDL_TEXTUREMODULATE_ALPHA |
srcA = srcA * alpha |
