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

NAME

6       request_video_bitmap - Triple buffering page flip request. Allegro game
7       programming library.
8

SYNOPSIS

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

DESCRIPTION

16       This function is used for triple buffering. It requests a page flip  to
17       display  the  specified  video  bitmap  object, but returns immediately
18       rather than waiting for a retrace. The flip will then take place during
19       the  next  vertical retrace, but you can carry on running other code in
20       the meantime and use the poll_scroll() routine to detect when the  flip
21       has  actually taken place. Triple buffering is only possible on certain
22       hardware: see the comments about request_scroll(). Example:
23
24          int current_page;
25          BITMAP *video_page[3];
26          ...
27          /* Create pages for page flipping */
28          video_page[0] = create_video_bitmap(SCREEN_W, SCREEN_H);
29          video_page[1] = create_video_bitmap(SCREEN_W, SCREEN_H);
30          video_page[2] = create_video_bitmap(SCREEN_W, SCREEN_H);
31          current_page = 0;
32          ...
33          /* draw the screen and flip pages */
34          draw_screen(video_page[current_page]);
35          do {
36          } while (poll_scroll());
37          request_video_bitmap(video_page[current_page]);
38          current_page = (current_page+1)%3;
39          ...
40

RETURN VALUE

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

SEE ALSO

46       poll_scroll(3),    request_scroll(3),     gfx_capabilities(3),     cre‐
47       ate_video_bitmap(3), scroll_screen(3), ex3buf(3), exupdate(3)
48
49
50
51Allegro                          version 4.4.3         request_video_bitmap(3)
Impressum