REQUEST_VIDEO_BITMAP(3ALLEG4) - Linux man page online | Library functions

Triple buffering page flip request. Allegro game programming library.

version 4.4.2
request_video_bitmap(3alleg4) Allegro manual request_video_bitmap(3alleg4)


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


#include <allegro.h> int request_video_bitmap(BITMAP *bitmap);


This function is used for triple buffering. It requests a page flip to display the speci‐ fied video bitmap object, but returns immediately rather than waiting for a retrace. The flip will then take place during the next vertical retrace, but you can carry on running other code in the meantime and use the poll_scroll() routine to detect when the flip has actually taken place. Triple buffering is only possible on certain hardware: see the com‐ ments about request_scroll(). Example: int current_page; BITMAP *video_page[3]; ... /* Create pages for page flipping */ video_page[0] = create_video_bitmap(SCREEN_W, SCREEN_H); video_page[1] = create_video_bitmap(SCREEN_W, SCREEN_H); video_page[2] = create_video_bitmap(SCREEN_W, SCREEN_H); current_page = 0; ... /* draw the screen and flip pages */ draw_screen(video_page[current_page]); do { } while (poll_scroll()); request_video_bitmap(video_page[current_page]); current_page = (current_page+1)%3; ...


Returns zero on success and non-zero on failure.


poll_scroll(3alleg4), request_scroll(3alleg4), gfx_capabilities(3alleg4), cre‐ ate_video_bitmap(3alleg4), scroll_screen(3alleg4), ex3buf(3alleg4), exupdate(3alleg4)
Allegro version 4.4.2 request_video_bitmap(3alleg4)
This manual Reference Other manuals
request_video_bitmap(3alleg4) referred by enable_triple_buffer(3alleg4) | ex3buf(3alleg4) | poll_scroll(3alleg4) | request_scroll(3alleg4) | scroll_screen(3alleg4)
refer to ex3buf(3alleg4) | exupdate(3alleg4) | gfx_capabilities(3alleg4) | poll_scroll(3alleg4) | request_scroll(3alleg4) | scroll_screen(3alleg4)
Download raw manual
Main page Allegro manual (+923) Allegro (+926) № 3 (+68044)
Go top