al_flip_display
void al_flip_display(void)
Introduced in 5.0.0
Copies or updates the front and back buffers so that what has been drawn previously on the currently selected display becomes visible on screen. Pointers to the special back and front buffer bitmaps remain valid and retain their semantics as back and front buffers respectively, although their contents may have changed.
Several display options change how this function behaves:
With ALLEGRO_SINGLE_BUFFER, no flipping is done. You still have to call this function to display graphics, depending on how the used graphics system works.
The ALLEGRO_SWAP_METHOD option may have additional information about what kind of operation is used internally to flip the front and back buffers.
If ALLEGRO_VSYNC is 1, this function will force waiting for vsync. If ALLEGRO_VSYNC is 2, this function will not wait for vsync. With many drivers the vsync behavior is controlled by the user and not the application, and ALLEGRO_VSYNC will not be set; in this case al_flip_display will wait for vsync depending on the settings set in the system's graphics preferences.
See also: al_set_new_display_flags, al_set_new_display_option
Examples: ex_audio_props, ex_bitmap, ex_bitmap_flip, ex_bitmap_target, ex_blend, ex_blend2, ex_blend_bench, ex_blend_test, ex_blit, ex_clip, ex_color, ex_curl, ex_d3d, ex_disable_screensaver, ex_display_options, ex_draw, ex_drawpixels, ex_draw_bitmap, ex_dualies, ex_expose, ex_filter, ex_font, ex_font_justify, ex_fs_resize, ex_fs_window, ex_gldepth, ex_glext, ex_gp2xwiz, ex_haiku, ex_iphone, ex_joystick_events, ex_joystick_hotplugging, ex_keyboard_focus, ex_lines, ex_lockbitmap, ex_logo, ex_membmp, ex_mixer_pp, ex_mouse, ex_mouse_cursor, ex_mouse_events, ex_mouse_focus, ex_multisample, ex_multiwin, ex_native_filechooser, ex_noframe, ex_ogre3d, ex_opengl, ex_opengl_pixel_shader, ex_physfs, ex_pixelformat, ex_premulalpha, ex_prim, ex_resize, ex_resize2, ex_rotate, ex_scale, ex_stream_seek, ex_subbitmap, ex_synth, ex_threads, ex_threads2, ex_timedwait, ex_timer, ex_transform, ex_ttf, ex_vsync, ex_warp_mouse, ex_windows, ex_winfull
Most helpful discussions:
- al_flip_display() forces 60fps? (1)
- [A5] event queue & timing problems (1)
- [A5] Copying a bitmap from a transformed screen (1)
- Is Allegro5 compatibale with Chrome OS
- ALLEGRO_EVENT_DISPLAY_SWITCH_OUT
- Why is this throwing an error???
- Math question (2d trig)
- Black stripe with menus on Windows
- Multiple threads/displays, Event handling question
- I am looking for correct detailed instructions how to build Allegro....
Other recent discussions:
- Delay on event queue while on thread
- Is there a way to wait before drawing a bitmap in Allegro5?
- why is my code failing
- Mipmap causing texture bleeding
- Lag when holding down key.
- Crasehs when use primitive functions
- Difficulty compiling on Windows
- Questions regarding pointers
- Screen is cleared and a new one appears Allegro5 in C?
- Allegro Access Violation while Drawing