Drawing onto memory bitmaps and then blitting them to the screen. allegro game programming library.
#include <allegro.h>
Example exmem
This program demonstrates the use of memory bitmaps. It creates a small temporary bitmap in memory, draws some circles onto it, and then blits lots of copies of it onto the screen.
BITMAP(3alleg4), END_OF_MAIN(3alleg4), SCREEN_H(3alleg4), SCREEN_W(3alleg4), acquire_screen(3alleg4), allegro_error(3alleg4), allegro_init(3alleg4), allegro_message(3alleg4), blit(3alleg4), circle(3alleg4), clear_bitmap(3alleg4), create_bitmap(3alleg4), desktop_palette(3alleg4), destroy_bitmap(3alleg4), install_keyboard(3alleg4), palette_color(3alleg4), readkey(3alleg4), release_screen(3alleg4), screen(3alleg4), set_gfx_mode(3alleg4), set_palette(3alleg4)