PDA

View Full Version : The fastest way to draw pixel by pixel?



Otto (Strange) Halmén
11-19-2006, 07:44 PM
A loop of CL_Display::draw_pixel() calls is very slow, especially when the number of pixels to be drawn approaches the total number of pixels on the display window. Is there any faster way to draw single pixels?

Seth
11-20-2006, 01:39 AM
The fastest way is probably to draw everything to a pixel buffer, then set a surface with it (each frame), so the video hardware only has to be sent a single texture each frame.

Otto (Strange) Halmén
12-06-2006, 07:32 AM
Not much faster for me... Maybe I did it wrong, although what you describe sounds like nothing else but CL_Surface::set_pixeldata (which I used).