1show_video_bitmap(3)            Allegro manual            show_video_bitmap(3)
2
3
4

NAME

6       show_video_bitmap  -  Flips  the  hardware  screen to use the specified
7       page. Allegro game programming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       int show_video_bitmap(BITMAP *bitmap);
14

DESCRIPTION

16       Attempts to page flip the hardware  screen  to  display  the  specified
17       video  bitmap  object,  which  must  be  the  same size as the physical
18       screen, and should have been obtained by calling the  create_video_bit‐
19       map() function.
20
21       Allegro will handle any necessary vertical retrace synchronisation when
22       page flipping, so you don't need to call vsync() before it. This  means
23       that  show_video_bitmap() has the same time delay effects as vsync() by
24       default. This can be adjusted with the "disable_vsync"  config  key  in
25       the [graphics] section of allegro.cfg. Example:
26
27          int current_page;
28          BITMAP *video_page[2];
29          ...
30          /* Create pages for page flipping */
31          video_page[0] = create_video_bitmap(SCREEN_W, SCREEN_H);
32          video_page[1] = create_video_bitmap(SCREEN_W, SCREEN_H);
33          current_page = 0;
34          ...
35          /* draw the screen and flip pages */
36          draw_screen(video_page[current_page]);
37          show_video_bitmap(video_page[current_page]);
38          current_page = (current_page+1)%2;
39          ...
40

RETURN VALUE

42       Returns zero on success and non-zero on failure.
43
44

SEE ALSO

46       scroll_screen(3),  create_video_bitmap(3), exaccel(3), exflip(3), exup‐
47       date(3)
48
49
50
51Allegro                          version 4.2.3            show_video_bitmap(3)
Impressum