I have had this program for a while...
I am creating a ray tracing program that needs to create the entire screen pixel by pixel. I used to do this in Allegro 4 by drawing in a bitmap that was the buffer and bliting it to the screen.
As a baseline test in Allegro 4 I would typically just make every pixel on the screen a random color like so...
for(int i = 0; i < width; i++)
for(int j = 0; j < height; j++)
putpixel(buffer, i, j, makecol(rand()%255, rand()%255, rand()%255));
I would do this every frame and could get about 200fps on a powerful computer...
However in Allegro 5 it seems just doing this to the screen is very slow probably about 15 - 30 fps?
I am wondering what is the fastest way to create an entire bitmap pixel by pixel then bliting it to the screen??