|
Size: 1055
Comment: update content (w/ Sam)
|
Size: 1056
Comment: update content - pointers, structs
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 18: | Line 18: |
| ||'''texture'''||the texture to update|| ||'''rect'''||a pointer to the [[SDL_Rect]] representing the area to update, or NULL to update the entire texture|| |
||'''texture'''||the SDL_Texture to update|| ||'''rect'''||the [[SDL_Rect]] structure representing the area to update, or NULL to update the entire texture|| |
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 SDL_Texture to update |
rect |
the SDL_Rect structure representing the area 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.
