How to display pixels on screen directly from a raw array of RGB values faster than SetPixel()?
I enjoy making "animations" in c++ such as a MandelBrot Set zoomer, Game of Life simulator etc. by setting pixels directly to the screen frame-by-frame. The SetPixel() command makes this incredibly easy, although unfortunately it's also painfully slow. Here is the sort of set-up I use for each frame, if I wanted to paint the entire screen with the contents of the array R: #include <windows.h> using namespace std; int main() { int xres = 1366; int yres = 768; char *R = new char [xres*yres*3]; /* R is a char array containing the RGB value of each pixel sequentially Arithmetic operations done to