Texture as both a source and destination?

Lets say I have an SDL_Texture and I set it as a render target. Is it possible then to use that texture as a source in SDL_RenderCopy? (to copy onto itself?) In other words: does SDL_RenderCopy have the semantics of memmove(), or is it more like memcpy()?
Sorry, I don’t have access to computer with SDL2 installed right now. And even if it works, I want to know whether it’s legal and supported, or “undefined behaviour”.

GPUs (and graphics drivers) don?t support that ? so SDL_RenderCopy behaves like memcpy rather than memmove in that manner.> On Oct 13, 2016, at 12:45 AM, nmapp wrote:

Lets say I have an SDL_Texture and I set it as a render target. Is it possible then to use that texture as a source in SDL_RenderCopy? (to copy onto itself?) In other words: does SDL_RenderCopy have the semantics of memmove(), or is it more like memcpy()?
Sorry, I don’t have access to computer with SDL2 installed right now. And even if it works, I want to know whether it’s legal and supported, or “undefined behaviour”.


SDL mailing list
SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Alex Szpakowski wrote:

GPUs (and graphics drivers) don???t support that ??? so SDL_RenderCopy behaves like memcpy rather than memmove in that manner.

Thank you. Yeah, it doesn’t work at all, guess I’ll have to use two textures and swap between them…