SDL_UpdateYUVTexture

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

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.

extern (C) nothrow @nogc extern
bool
SDL_UpdateYUVTexture
(,
const(SDL_Rect)* rect
,
const(ubyte)* Yplane
,
int Ypitch
,
const(ubyte)* Uplane
,
int Upitch
,
const(ubyte)* Vplane
,
int Vpitch
)

Parameters

texture SDL_Texture*

The texture to update.

rect const(SDL_Rect)*

A pointer to the rectangle of pixels to update, or null to update the entire texture.

Yplane const(ubyte)*

The raw pixel data for the Y plane.

Ypitch int

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

Uplane const(ubyte)*

The raw pixel data for the U plane.

Upitch int

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

Vplane const(ubyte)*

The raw pixel data for the V plane.

Vpitch int

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

Return Value

Type: bool

true on success or false on failure; call SDL_GetError for more information.

Threadsafety: This function should only be called on the main thread.

See Also

Meta