Michell Computing

Free Pascal fast bitmaps

A short series on getting bitmaps onto the screen quickly from Free Pascal. The original posts were in two parts; the figures below are what survived from the uploads.

Lazarus test reporting 6.99 ms average draw time, 143 frames per second

The test harness, built in Lazarus 1.7, is titled Fast Bitmap Drawing <2>. It fills a window with a solid colour and a large numeral, then reports an average draw time. On this run that was 6.99 ms, or about 143 frames a second. The project on disk was called CompactImages, with separate units for LCL and OpenGL paths.

The point of the exercise was not the red window. Mapping and visualisation code spends most of its time shoving pixels. If a full-window blit is cheap, a globe or a Mandelbrot set has a chance of feeling interactive. The follow-up rewrite of the Mandelbrot viewer is the next note.

Back to news