Discussion:
[SDL] Texture as both a source and destination?
nmapp
2016-10-13 03:45:28 UTC
Permalink
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".
Alex Szpakowski
2016-10-14 20:54:17 UTC
Permalink
GPUs (and graphics drivers) don’t support that – so SDL_RenderCopy behaves like memcpy rather than memmove in that manner.
Post by nmapp
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
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org <http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org>
nmapp
2016-10-17 00:51:13 UTC
Permalink
Post by Alex Szpakowski
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...
Loading...