Fixed bug 3681 - SDL_UpateTexture documentation not specific enough about format requirement
authorSam Lantinga <slouken@libsdl.org>
Thu, 10 Aug 2017 11:57:19 -0700
changeset 11216908e4fe53f5a
parent 11215 51aeabb61b2e
child 11217 d9c3f934bd0e
Fixed bug 3681 - SDL_UpateTexture documentation not specific enough about format requirement

Simon Hug

The documentation of SDL_UpateTexture does not say that the pixel data has to be in the format of the texture.
include/SDL_render.h
     1.1 --- a/include/SDL_render.h	Wed Aug 09 20:26:16 2017 -0700
     1.2 +++ b/include/SDL_render.h	Thu Aug 10 11:57:19 2017 -0700
     1.3 @@ -370,9 +370,12 @@
     1.4   *  \param texture   The texture to update
     1.5   *  \param rect      A pointer to the rectangle of pixels to update, or NULL to
     1.6   *                   update the entire texture.
     1.7 - *  \param pixels    The raw pixel data.
     1.8 + *  \param pixels    The raw pixel data in the format of the texture.
     1.9   *  \param pitch     The number of bytes in a row of pixel data, including padding between lines.
    1.10   *
    1.11 + *  The pixel data must be in the format of the texture. The pixel format can be
    1.12 + *  queried with SDL_QueryTexture.
    1.13 + *
    1.14   *  \return 0 on success, or -1 if the texture is not valid.
    1.15   *
    1.16   *  \note This is a fairly slow function.