Wiki Page Content

Differences between revisions 5 and 6
Revision 5 as of 2010-09-15 05:31:20
Size: 1058
Editor: SheenaSmith
Comment: update content (w/ Sam); remove 'draft' note
Revision 6 as of 2010-09-15 05:32:23
Size: 1051
Editor: SheenaSmith
Comment: update content (w/ Sam)
Deletions are marked like this. Additions are marked like this.
Line 32: Line 32:
This is a fairly slow function. It is not intended for use with streaming textures. This is a fairly slow function. It is intended for use with static textures.

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 type SDL_Rect 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 a negative error code on failure; call SDL_GetError() for more information.

Code Examples

You can add your code example here

Remarks

This is a fairly slow function. It is intended for use with static textures.


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