logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL_UpdateYUVTexture - Update a rectangle within a planar YV12 or IYUV texture with new pixel data.

Availability

       This function is available since SDL 3.2.0.

Description

       You  can use SDL_UpdateTexture () as long as your pixel data is a contiguous block of Y and U/V planes in
       the proper order, but this function is available if your pixel data is not contiguous.

Function Parameters

texture
              the texture to update.

       rect   a pointer to the rectangle of pixels to update, or NULL to update the entire texture.

       Yplane the raw pixel data for the Y plane.

       Ypitch the number of bytes between rows of pixel data for the Y plane.

       Uplane the raw pixel data for the U plane.

       Upitch the number of bytes between rows of pixel data for the U plane.

       Vplane the raw pixel data for the V plane.

       Vpitch the number of bytes between rows of pixel data for the V plane.

Header File

       Defined in SDL3/SDL_render.h

Name

       SDL_UpdateYUVTexture - Update a rectangle within a planar YV12 or IYUV texture with new pixel data.

Return Value

       Returns true on success or false on failure; call

       SDL_GetError () for more information.

See Also

(3), SDL_UpdateNVTexture(3), (3), SDL_UpdateTexture(3)

Simple Directmedia Layer                           SDL 3.2.10                            SDL_UpdateYUVTexture(3)

Synopsis

#include"SDL3/SDL.h"boolSDL_UpdateYUVTexture(SDL_Texture*texture,constSDL_Rect*rect,constUint8*Yplane,intYpitch,constUint8*Uplane,intUpitch,constUint8*Vplane,intVpitch);

Thread Safety

       This function should only be called on the main thread.

See Also