In need for a fast graphical function like SetPixel()!

Dear reader,

I want to do something with the screen and C++, I'm searching for a function that sets a single pixel with the specified RGB-values and coordinates.

The SetPixel() function completely meets these requirements, and I was really happy untill I tried it... This function is TERRIBLY slow and when I use GetDC(0) (this should return a DC for the entire screen) SetPixel() only sets the topmost row of pixels on the screen to the desired colours.

Is there a nice, fast low-level pixel-setting function for which no external libraries are needed? I would prefer a cross-platform function, but the Windows API would be fine too. I'm thinking of a function that continuously can set all the pixels of a screen at acceptable FPS like SetPixel() does, but faster. The PC-games I play do not take an minute to print one frame, so I know there must be some function out there!

Thanks for reading!

Kind regards,
Niels Meijer
Topic archived. No new replies allowed.