Supporting different screen update methods in a single program. allegro game programming library.
#include <allegro.h>
Example exupdate
This program demonstrates how to support double buffering, page flipping, and triple buffering as options within a single program, and how to make things run at a constant rate no matter what the speed of your computer. You have to use this example from the command line to specify as first parameter a number which represents the type of video update you want: 1 for double buffering with memory bitmaps, 2 for page flipping, 3 for triple buffering and 4 for double buffering with system bitmaps. After this, a dialog allows you to select a screen resolution and finally you will see a kaleidoscopic animation, along with a frames per second counter on the top left of the screen.
BITMAP(3alleg4), END_OF_FUNCTION(3alleg4), END_OF_MAIN(3alleg4), LOCK_FUNCTION(3alleg4), LOCK_VARIABLE(3alleg4), PALETTE(3alleg4), SCREEN_H(3alleg4), SCREEN_W(3alleg4), acquire_bitmap(3alleg4), allegro_error(3alleg4), allegro_init(3alleg4), allegro_message(3alleg4), bitmap_color_depth(3alleg4), blit(3alleg4), clear_bitmap(3alleg4), create_bitmap(3alleg4), create_system_bitmap(3alleg4), create_video_bitmap(3alleg4), desktop_palette(3alleg4), destroy_bitmap(3alleg4), enable_triple_buffer(3alleg4), fixcos(3alleg4), fixed(3alleg4), fixmul(3alleg4), fixsin(3alleg4), fixtoi(3alleg4), font(3alleg4), ftofix(3alleg4), generate_332_palette(3alleg4), gfx_capabilities(3alleg4), gfx_mode_select_ex(3alleg4), install_int_ex(3alleg4), install_keyboard(3alleg4), install_mouse(3alleg4), install_timer(3alleg4), keypressed(3alleg4), line(3alleg4), makecol(3alleg4), poll_scroll(3alleg4), release_bitmap(3alleg4), request_video_bitmap(3alleg4), screen(3alleg4), set_color_depth(3alleg4), set_gfx_mode(3alleg4), set_palette(3alleg4), show_video_bitmap(3alleg4), textout_ex(3alleg4), textprintf_ex(3alleg4), triangle(3alleg4), vsync(3alleg4), xor_mode(3alleg4)