You need to create the texture with the SDL_TEXTUREACCESS_TARGET flag.
authorSam Lantinga <slouken@libsdl.org>
Sun, 22 Jan 2012 01:29:26 -0500
changeset 62487fe4b2b78acc
parent 6247 b6212690f78d
child 6250 cce0ddcf6747
You need to create the texture with the SDL_TEXTUREACCESS_TARGET flag.
include/SDL_render.h
     1.1 --- a/include/SDL_render.h	Sun Jan 22 01:26:28 2012 -0500
     1.2 +++ b/include/SDL_render.h	Sun Jan 22 01:29:26 2012 -0500
     1.3 @@ -384,7 +384,7 @@
     1.4  /**
     1.5   * \brief Set a texture as the current rendering target.
     1.6   *
     1.7 - * \param texture The targeted texture, or NULL for the default render target
     1.8 + * \param texture The targeted texture, which must be created with the SDL_TEXTUREACCESS_TARGET flag, or NULL for the default render target
     1.9   *
    1.10   * \return 0 on success, or -1 on error
    1.11   */