SDL_UpdateTexture
Use this function to update the given texture rectangle with new pixel data.
Contents
Syntax
int SDL_UpdateTexture(SDL_TextureID textureID,
const SDL_Rect* rect,
const void* pixels,
int pitch)
Function Parameters
textureID |
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.
