Quite a while ago, I made this snippet. This code is basically the same, except that it adds animation.
This method of blitting is very fast assuming you don't use a surface that's too large. On a 500 x 500 surface, I managed 350fps using only 0-1% of the cpu. This snippet may appear much slower because of the amount of CPU it's applying to each pixel, but the blitting itself is very fast. Also, don't forget that an average game will only redraw parts of the window that need redrawing, this redraws the whole surface every time.
So, as long as you know what you're doing, Windows GDI isn't actually that slow :icon_lol:
edit: Running in Debug may reduce speed by a lot, set it as Release.
Edited 7 Years Ago by William Hemsworth: n/a