Wiki Page Content

Differences between revisions 1 and 5 (spanning 4 versions)
Revision 1 as of 2009-12-10 03:36:23
Size: 1333
Editor: SheenaSmith
Comment: create page, add content
Revision 5 as of 2009-12-20 05:35:44
Size: 1516
Editor: SheenaSmith
Comment: content changed
Deletions are marked like this. Additions are marked like this.
Line 17: Line 17:
||'''textureID'''||the source texture; see [[#textureID|Remarks]] for details|| ||'''textureID'''||the source texture; see [[#Remarks|Remarks]] for details||
Line 31: Line 31:
<<Anchor(textureID)>> The texture channel modulation is provided by the enumeration [[SDL_TextureModulate]] using these flags:
<<Include(SDL_TextureModulate, , , from="== Values ==", to="== Code Examples ==")>>
The texture is blended with the destination based on its blend mode set with [[SDL_SetTextureBlendMode]]().

The texture color is affected based on the color modulation set by [[SDL_SetTextureColorMod]](). The texture alpha is affected based on the alpha modulation set by [[SDL_SetTextureAlphaMod]]().
Line 39: Line 40:
 .[[SDL_SetTextureAlphaMod]]
 .[[SDL_SetTextureBlendMode]]
 .[[SDL_SetTextureColorMod]]

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 is blended with the destination based on its blend mode set with SDL_SetTextureBlendMode().

The texture color is affected based on the color modulation set by SDL_SetTextureColorMod(). The texture alpha is affected based on the alpha modulation set by SDL_SetTextureAlphaMod().


CategoryAPI, CategoryVideo

None: SDL_RenderCopy (last edited 2015-08-18 20:57:36 by PhilippWiesemann)

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