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 6248 7fe4b2b78acc
parent 6247 b6212690f78d
child 6250 cce0ddcf6747
You need to create the texture with the SDL_TEXTUREACCESS_TARGET flag.
include/SDL_render.h
--- a/include/SDL_render.h	Sun Jan 22 01:26:28 2012 -0500
+++ b/include/SDL_render.h	Sun Jan 22 01:29:26 2012 -0500
@@ -384,7 +384,7 @@
 /**
  * \brief Set a texture as the current rendering target.
  *
- * \param texture The targeted texture, or NULL for the default render target
+ * \param texture The targeted texture, which must be created with the SDL_TEXTUREACCESS_TARGET flag, or NULL for the default render target
  *
  * \return 0 on success, or -1 on error
  */