I am currently developing a project with SDL. It mainly draws and moves images (surfaces) on the screen.
To move an image without leaving a trace, you must first clean the screen surface, much like glClear (), and now I am doing this with a simple loop repeating over the pixels of the surface (also drawing a black box on the surface or in memory).
While the previous solutions work fine on small surfaces, they become slower as the surface grows, so I was looking for the fastest way that I could clear the (zero) block of memory.
In addition, a friend noted that using SIMD instructions can do the job very quickly, but the last time I did ASM was at 8085, any information about this could also be useful.
source share