Wiki Page Content

Differences between revisions 5 and 6
Revision 5 as of 2013-10-05 19:35:09
Size: 1011
Comment: Changed descriptions, see SGFunctions page.
Revision 6 as of 2014-07-04 10:50:18
Size: 1033
Comment: Added link.
Deletions are marked like this. Additions are marked like this.
Line 17: Line 17:
||'''texture'''||the targeted texture, which must be created with the SDL_TEXTUREACCESS_TARGET flag, or NULL for the default render target|| ||'''texture'''||the targeted texture, which must be created with the [[SDL_TextureAccess|SDL_TEXTUREACCESS_TARGET]] flag, or NULL for the default render target||

SDL_SetRenderTarget

Use this function to set a texture as the current rendering target.

Syntax

int SDL_SetRenderTarget(SDL_Renderer *renderer,
                        SDL_Texture  *texture)

Function Parameters

renderer

the rendering context

texture

the targeted texture, which must be created with the SDL_TEXTUREACCESS_TARGET flag, or NULL for the default render target

Return Value

Returns 0 on success or a negative error code on failure; call SDL_GetError() for more information.

Code Examples

You can add your code example here

Remarks

Before using this function, you should check the SDL_RENDERER_TARGETTEXTURE bit in the flags of SDL_RendererInfo to see if render targets are supported.


CategoryAPI, CategoryRender

None: SDL_SetRenderTarget (last edited 2016-05-11 20:37:00 by PhilippWiesemann)

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