Wiki Page Content

Revision 1 as of 2009-12-10 03:36:23

Clear message

SDL_RenderCopy

Use this function to copy a portion of the texture to the current rendering target.

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 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


CategoryAPI, CategoryVideo

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit