include/SDL_render.h
changeset 7759 869583422e5a
parent 7542 399ff49069a5
child 8028 e3e00f8e6b91
     1.1 --- a/include/SDL_render.h	Sat Sep 28 14:06:39 2013 -0700
     1.2 +++ b/include/SDL_render.h	Sat Sep 28 14:06:47 2013 -0700
     1.3 @@ -382,6 +382,31 @@
     1.4                                                const void *pixels, int pitch);
     1.5  
     1.6  /**
     1.7 + *  \brief Update a rectangle within a planar YV12 or IYUV texture with new pixel data.
     1.8 + *
     1.9 + *  \param texture   The texture to update
    1.10 + *  \param rect      A pointer to the rectangle of pixels to update, or NULL to
    1.11 + *                   update the entire texture.
    1.12 + *  \param Yplane    The raw pixel data for the Y plane.
    1.13 + *  \param Ypitch    The number of bytes between rows of pixel data for the Y plane.
    1.14 + *  \param Uplane    The raw pixel data for the U plane.
    1.15 + *  \param Upitch    The number of bytes between rows of pixel data for the U plane.
    1.16 + *  \param Vplane    The raw pixel data for the V plane.
    1.17 + *  \param Vpitch    The number of bytes between rows of pixel data for the V plane.
    1.18 + *
    1.19 + *  \return 0 on success, or -1 if the texture is not valid.
    1.20 + *
    1.21 + *  \note You can use SDL_UpdateTexture() as long as your pixel data is
    1.22 + *        a contiguous block of Y and U/V planes in the proper order, but
    1.23 + *        this function is available if your pixel data is not contiguous.
    1.24 + */
    1.25 +extern DECLSPEC int SDLCALL SDL_UpdateYUVTexture(SDL_Texture * texture,
    1.26 +                                                 const SDL_Rect * rect,
    1.27 +                                                 const Uint8 *Yplane, int Ypitch,
    1.28 +                                                 const Uint8 *Uplane, int Upitch,
    1.29 +                                                 const Uint8 *Vplane, int Vpitch);
    1.30 +
    1.31 +/**
    1.32   *  \brief Lock a portion of the texture for write-only pixel access.
    1.33   *
    1.34   *  \param texture   The texture to lock for access, which was created with