Doing some performance optimizations of our drawing framework, I had the need to speed putting pixels on the screen up a little. Our Windows window was stuttering on heavy resizing (something no-one would do on a day to day basis but users are strange) and had some impacts when switching between maximized and “normal” state, already turned everything into fastest GDI mode and also used the fastest Bitmap drawing function .NET knows, without success.
I did some research and in case someone is interested to do some GDI based drawing in Windows/.NET too, I decided to share my results. Found an article about a Win32 function which lets us copy our render-buffer lightning fast to the screen. It is much faster than Graphics.DrawImageUnscaled and works well with our code because we manage our own pixel buffer in the background anyways.
There is also a GitHub repo from the original author showing some demo program.
Happy coding!