You need to create the texture with the SDL_TEXTUREACCESS_TARGET flag.

This commit is contained in:
Sam Lantinga 2012-01-22 01:29:26 -05:00
parent 0458fa488a
commit 8d3c63045f

View file

@ -384,7 +384,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_RenderTargetSupported(SDL_Renderer *rendere
/** /**
* \brief Set a texture as the current rendering target. * \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 * \return 0 on success, or -1 on error
*/ */