Wiki Page Content

Differences between revisions 3 and 4
Revision 3 as of 2010-01-10 19:11:11
Size: 1153
Editor: SheenaSmith
Comment: added DRAFT to top for removal after page is edited
Revision 4 as of 2010-01-21 18:43:07
Size: 1149
Editor: SheenaSmith
Comment: Update TextureID > Texture*
Deletions are marked like this. Additions are marked like this.
Line 12: Line 12:
int SDL_UpdateTexture(SDL_TextureID textureID, int SDL_UpdateTexture(SDL_Texture* texture,
Line 19: Line 19:
||'''textureID'''||the texture to update|| ||'''texture'''||the texture to update||

DRAFT

SDL_UpdateTexture

Use this function to update the given texture rectangle with new pixel data.

Syntax

int SDL_UpdateTexture(SDL_Texture*    texture,
                      const SDL_Rect* rect,
                      const void*     pixels,
                      int             pitch)

Function Parameters

texture

the texture to update

rect

a pointer to the rectangle of [[SDL_Rect]] with pixels to update, or NULL to update the entire texture

pixels

the raw pixel data

pitch

the number of bytes between rows of pixel data

Return Value

Returns 0 on success or -1 if the texture is not valid; call SDL_GetError() for more information.

Code Examples

You can add your code example here

Remarks

This is a fairly slow function.


CategoryAPI, CategoryVideo

None: SDL_UpdateTexture (last edited 2017-08-11 23:41:29 by ChliHug)

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